<!--流程管理-->
<!--用户权限说明-->
<!--管理员：代码：1，可以做所有的操作-->
<!--问题编辑人员：代码：2，可以做问题的修改操作-->
<template><!--模板-->
  <div style="margin: 0;padding: 0"><!--边缘样式-->
    <el-container><!--Element饿了么 UI 的布局容器，实现整体页面框架。顶部导航 + 侧边栏 + 主内容区的经典管理系统布局。-->
      <!--页面表头设计-->
      <el-header style="height: 7vh">
        <el-link class="headMain" href="http://10.255.96.48:3404/">{{main.qualityManagementSystem }}</el-link>
        <span class="center-text">{{main.systemManagementSystem}}</span>
        <el-popover
            placement="top-start"
            title="用户信息"
            width="200"
            trigger="hover">
          <div style="margin-top: 10px">Name：{{useName}}</div>
          <div style="margin-top: 10px">ID:{{useId}}</div>
          <div style="margin-top: 10px" @click="logOut"><el-link>退出</el-link></div>
          <div class="headMain" slot="reference">{{useName}}</div>
        </el-popover>
      </el-header>
      <el-container>
        <el-aside width="200px" style="height: 90vh">
          <div style="margin-top: 5px">
            <el-button style="width: 100%"
                       :style="{backgroundColor:buttonBackColor1,color:buttonColor1}"
                       @click="buttonMainSelect(1)">{{main.viewDocument}}</el-button>
          </div>
          <div style="margin-top: 15px">
            <el-button style="width: 100%"
                       :style="{backgroundColor:buttonBackColor2,color:buttonColor2}"
                       @click="buttonMainSelect(2)">{{main.systemCheck}}</el-button>
          </div>
          <div style="margin-top: 15px">
            <el-button style="width: 100%"
                       :style="{backgroundColor:buttonBackColor3,color:buttonColor3}"
                       @click="buttonMainSelect(3)">品质评价</el-button>
          </div>
        </el-aside>
        <el-container>
          <!--表头主题设计-->
          <el-main class="el-main" style="height: 79vh;overflow: auto">
            <div v-if="buttonDoe !== -1">
              <el-tabs v-if="buttonDoe===1" v-model="activeNameDocument" @tab-click="handleClick">
              <!--PDF文档-->
              <el-tab-pane :label="pageVal.pdfDocument.pdfDocument" name="pdfDocument">
                <div style="display: flex; align-items: center; gap: 10px; margin-top: 0.5px;">
                  <!-- 上传文档按钮（左侧） -->
                  <el-popover
                      placement="bottom"
                      trigger="click"
                      v-model="uploadDocumentDialog"
                      style="text-align: center"
                      width="400">
                    <div style="text-align: center">
                      <el-form
                          :model="pdfDocumentForm"
                          label-width="120px"
                          label-position="left"
                          ref="pdfDocumentFormRef"
                          :rules="pdfDocumentRules">

                        <el-form-item :label="pageVal.pdfDocument.number" prop="number" required>
                          <el-input v-model="pdfDocumentForm.number"></el-input>
                        </el-form-item>

                        <el-form-item :label="pageVal.pdfDocument.name" prop="name" required>
                          <el-input v-model="pdfDocumentForm.name"></el-input>
                        </el-form-item>

                        <el-form-item :label="pageVal.pdfDocument.name_english" prop="name_english" required>
                          <el-input v-model="pdfDocumentForm.name_english"></el-input>
                        </el-form-item>

                        <el-form-item :label="pageVal.pdfDocument.name_russian" prop="name_russian" required>
                          <el-input v-model="pdfDocumentForm.name_russian"></el-input>
                        </el-form-item>
                      </el-form>

                      <el-upload
                          ref="pdfUploader"
                          class="upload-demo"
                          action="#"
                          :auto-upload="false"
                          :on-change="handleFileChange"
                          :on-preview="handlePreview"
                          :on-remove="handleRemove"
                          :before-remove="beforeRemove"
                          :limit="1"
                          :on-exceed="handleExceed"
                          :file-list="fileList"
                          :before-upload="beforeUpload"
                          accept=".pdf">
                        <el-button size="medium" type="primary">{{pageVal.pdfDocument.clickToUpload}}</el-button>
                        <div slot="tip" class="el-upload__tip" style="font-size: 13px">
                          <i class="el-icon-info" style="color: red"></i>
                          {{pageVal.pdfDocument.onlyPdf}}
                        </div>
                      </el-upload>

                      <div style="margin-top: 20px; text-align: right">
                        <el-button @click="uploadDocumentDialog = false">{{main.cancel}}</el-button>
                        <el-button
                            type="primary"
                            @click="submitUpload"
                            :disabled="!isFormValid">
                          {{pageVal.pdfDocument.confirmToUpload}}
                        </el-button>
                      </div>
                    </div>
                    <el-button slot="reference" type="primary" v-if="usePower===10">{{pageVal.pdfDocument.uploadDocument}}</el-button>
                  </el-popover>
                  <!-- 搜索框（右侧，带搜索按钮） -->
                  <el-input
                      :placeholder="pageVal.pdfDocument.consultDocument"
                      v-model="searchQuery"
                      style="flex: 1">
                    <el-button slot="append" icon="el-icon-search" @click="searchPdfDocument"></el-button>
                  </el-input>
                </div>
                <el-table
                    :data="pdfDocumentData"
                    style="width: 100%; margin-top: 5px"
                    :height="pdfDocumentHeight"
                    border
                    highlight-current->
                  <!-- 序号 -->
                  <el-table-column
                      :label="pageVal.pdfDocument.order"
                      width="60"
                      align="center"
                      v-slot:default="scope">
                    {{scope.$index+1}}
                  </el-table-column>
                  <!-- 文件编号 -->
                  <el-table-column
                      prop="number"
                      :label="pageVal.pdfDocument.number"
                      align="center"
                      width="200px">
                  </el-table-column>
                  <!-- 名称 -->
                  <el-table-column
                      prop="name"
                      :label="pageVal.pdfDocument.name"
                      align="center"
                      v-slot:default="scope">
                    <span v-if="languageS==='chinese'">{{scope.row.name}}</span>
                    <span v-if="languageS==='english'">{{scope.row.name_english}}</span>
                    <span v-if="languageS==='russian'">{{scope.row.name_russian}}</span>
                  </el-table-column>
                  <!-- 版本号 -->
                  <el-table-column
                      prop="version_number"
                      :label="pageVal.pdfDocument.version_number"
                      width="70"
                      align="center">
                  </el-table-column>
                  <!-- 上传人 -->
                  <el-table-column
                      prop="upload_person"
                      :label="pageVal.pdfDocument.upload_person"
                      width="220"
                      align="center">
                  </el-table-column>
                  <!-- 上传时间 -->
                  <el-table-column
                      prop="upload_time"
                      :label="pageVal.pdfDocument.upload_time"
                      width="120"
                      align="center">
                  </el-table-column>
                  <!-- 修改时间 -->
                  <el-table-column
                      prop="revise_time"
                      :label="pageVal.pdfDocument.revise_time"
                      width="120"
                      align="center">
                  </el-table-column>
                  <!-- 操作 -->
                  <el-table-column
                      :label="pageVal.pdfDocument.operate"
                      width="88"
                      align="center"
                      v-slot:default="scope">
                    <el-link style="margin-right: 8px" @click="documentShow('viewDocument',scope)">
                      <i class="el-icon-view"></i>
                    </el-link>
                    <el-link style="margin-right: 8px" @click="showEditDocumentDialog(scope)" v-if="usePower===10">
                      <i class="el-icon-edit"></i>
                    </el-link>
                    <el-link style="margin-right: 8px" @click="deleteData('deletePdfDocument',scope)" v-if="usePower===10">
                      <i class="el-icon-delete"></i>
                    </el-link>
                  </el-table-column>
                </el-table>
              </el-tab-pane>
              <!--下载表单-->
              <el-tab-pane :label="pageVal.downloadForm.downloadForm" name="downloadForm">
                <div style="display: flex; align-items: center; gap: 10px; margin-top: 0.5px;">
                  <!-- 上传文档按钮（左侧） -->
                  <el-popover
                      placement="bottom"
                      trigger="click"
                      v-model="uploadFormDialog"
                      style="text-align: center"
                      width="400">
                    <div style="text-align: center">
                      <el-form
                          :model="formDocumentForm"
                          label-width="120px"
                          label-position="left"
                          ref="formDocumentFormRef"
                          :rules="formDocumentRules">

                        <el-form-item :label="pageVal.downloadForm.number" prop="number" required>
                          <el-input v-model="formDocumentForm.number"></el-input>
                        </el-form-item>

                        <el-form-item :label="pageVal.downloadForm.name" prop="name" required>
                          <el-input v-model="formDocumentForm.name"></el-input>
                        </el-form-item>

                        <el-form-item :label="pageVal.downloadForm.name_english" prop="name_english" required>
                          <el-input v-model="formDocumentForm.name_english"></el-input>
                        </el-form-item>

                        <el-form-item :label="pageVal.downloadForm.name_russian" prop="name_russian" required>
                          <el-input v-model="formDocumentForm.name_russian"></el-input>
                        </el-form-item>
                      </el-form>

                      <el-upload
                          ref="formUploader"
                          class="upload-demo"
                          action="#"
                          :auto-upload="false"
                          :on-change="handleFileChangeForm"
                          :on-preview="handlePreviewForm"
                          :on-remove="handleRemoveForm"
                          :before-remove="beforeRemoveForm"
                          :limit="1"
                          :on-exceed="handleExceedForm"
                          :file-list="fileListForm"
                          :before-upload="beforeUploadForm">
                        <el-button size="medium" type="primary">{{pageVal.pdfDocument.clickToUpload}}</el-button>
                      </el-upload>

                      <div style="margin-top: 20px; text-align: right">
                        <el-button @click="uploadFormDialog = false">{{main.cancel}}</el-button>
                        <el-button
                            type="primary"
                            @click="submitUploadForm"
                            :disabled="!isFormValidForm">
                          {{pageVal.pdfDocument.confirmToUpload}}
                        </el-button>
                      </div>
                    </div>
                    <el-button slot="reference" type="primary" v-if="usePower===10">{{pageVal.pdfDocument.uploadDocument}}</el-button>
                  </el-popover>
                  <!-- 搜索框（右侧，带搜索按钮） -->
                  <el-input
                      :placeholder="pageVal.pdfDocument.consultDocument"
                      v-model="searchQueryForm"
                      style="flex: 1">
                    <el-button slot="append" icon="el-icon-search" @click="searchFormDocument"></el-button>
                  </el-input>
                </div>
                <el-table
                    :data="formDocumentData"
                    style="width: 100%; margin-top: 5px"
                    :height="pdfDocumentHeight"
                    border
                    highlight-current->
                  <!-- 序号 -->
                  <el-table-column
                      :label="pageVal.pdfDocument.order"
                      width="60"
                      align="center"
                      v-slot:default="scope">
                    {{scope.$index+1}}
                  </el-table-column>
                  <!-- 表单编号 -->
                  <el-table-column
                      prop="number"
                      :label="pageVal.downloadForm.number"
                      align="center">
                  </el-table-column>
                  <!-- 名称 -->
                  <el-table-column
                      prop="name"
                      :label="pageVal.downloadForm.name"
                      align="center"
                      v-slot:default="scope">
                    <span v-if="languageS==='chinese'">{{scope.row.name}}</span>
                    <span v-if="languageS==='english'">{{scope.row.name_english}}</span>
                    <span v-if="languageS==='russian'">{{scope.row.name_russian}}</span>
                  </el-table-column>
                  <!-- 版本号 -->
                  <el-table-column
                      prop="version_number"
                      :label="pageVal.pdfDocument.version_number"
                      width="70"
                      align="center">
                  </el-table-column>
                  <!-- 上传人 -->
                  <el-table-column
                      prop="upload_person"
                      :label="pageVal.pdfDocument.upload_person"
                      width="120"
                      align="center">
                  </el-table-column>
                  <!-- 上传时间 -->
                  <el-table-column
                      prop="upload_time"
                      :label="pageVal.pdfDocument.upload_time"
                      width="120"
                      align="center">
                  </el-table-column>
                  <!-- 修改时间 -->
                  <el-table-column
                      prop="revise_time"
                      :label="pageVal.pdfDocument.revise_time"
                      width="120"
                      align="center">
                  </el-table-column>
                  <!-- 操作 -->
                  <el-table-column
                      :label="pageVal.pdfDocument.operate"
                      width="88"
                      align="center"
                      v-slot:default="scope">
                    <el-link style="margin-right: 8px" @click="downloadForm(scope)">
                      <i class="el-icon-download"></i>
                    </el-link>
                    <el-link style="margin-right: 8px" @click="showEditFormDialog(scope)" v-if="usePower===10">
                      <i class="el-icon-edit"></i>
                    </el-link>
                    <el-link style="margin-right: 8px" @click="deleteData('deleteFormDocument',scope)" v-if="usePower===10">
                      <i class="el-icon-delete"></i>
                    </el-link>
                  </el-table-column>
                </el-table>
              </el-tab-pane>
              <!--体系文件-->
              <el-tab-pane :label="pageVal.systemDocument.systemDocument" name="systemDocument">
                <!-- 上传文档按钮（左侧） -->
                <el-upload
                    ref="pdfUploader"
                    class="upload-demo"
                    action="#"
                    :auto-upload="false"
                    :on-change="handleFileChangeDocx"
                    :on-preview="handlePreviewDocx"
                    :on-remove="handleRemoveDocx"
                    :before-remove="beforeRemoveDocx"
                    :limit="1"
                    :on-exceed="handleExceedDocx"
                    :file-list="fileList"
                    :before-upload="beforeUploadDocx"
                    accept=".docx">
                  <el-button size="medium" type="primary">{{pageVal.pdfDocument.clickToUpload}}</el-button>
                  <div slot="tip" class="el-upload__tip" style="font-size: 13px">
                    <i class="el-icon-info" style="color: red"></i>
                    只能上传docx文件
                  </div>
                </el-upload>
              </el-tab-pane>
            </el-tabs>
              <el-tabs v-if="buttonDoe===2" v-model="activeName" @tab-click="handleClick">
              <el-tab-pane :label="pageVal.standardWork.standardWork" name="first">
                <div style="text-align: right;margin-bottom: 5px">
                  <el-button size="mini" @click="standardWorkSuperviseEditShow(1,null)">{{pageVal.standardWork.add}}</el-button>
                  <el-button size="mini" @click="clearFilters">{{pageVal.standardWork.filter}}</el-button>
                </div>
                <el-table
                    ref="table"
                    :data="standardWorkSuperviseData"
                    border
                    style="width: 100%"
                    :height="standardWorkSuperviseHeight">
                  <!--车间-->
                  <el-table-column
                      prop="workshop"
                      :label="pageVal.standardWork.workshop"
                      width="140"
                      align="center"
                      :filters="workshopFilters"
                      :filter-method="filterWorkshop"
                      v-slot:default="scope">
                    <span v-if="languageS==='chinese' && scope.row.workshop.split('/').length===3">{{scope.row.workshop.split('/')[0]}}</span>
                    <span v-else-if="languageS==='english' && scope.row.workshop.split('/').length===3">{{scope.row.workshop.split('/')[1]}}</span>
                    <span v-else-if="languageS==='russian' && scope.row.workshop.split('/').length===3">{{scope.row.workshop.split('/')[2]}}</span>
                    <span v-else>{{scope.row.workshop}}</span>
                  </el-table-column>
                  <!--线体-->
                  <el-table-column
                      prop="line"
                      :label="pageVal.standardWork.line"
                      width="120"
                      align="center"
                    :filters="lineFilters"
                    :filter-method="filterLine"
                    v-slot:default="scope" >
                    <span v-if="languageS==='chinese' && scope.row.line.split('/').length===3">{{scope.row.line.split('/')[0]}}</span>
                    <span v-else-if="languageS==='english' && scope.row.line.split('/').length===3">{{scope.row.line.split('/')[1]}}</span>
                    <span v-else-if="languageS==='russian' && scope.row.line.split('/').length===3">{{scope.row.line.split('/')[2]}}</span>
                    <span v-else>{{scope.row.line}}</span>
                  </el-table-column>
                  <!--工序-->
                  <el-table-column
                      prop="op"
                      :label="pageVal.standardWork.op"
                      width="80"
                      align="center">
                  </el-table-column>
                  <!--审核项目-->
                  <el-table-column
                      prop="project"
                      :label="pageVal.standardWork.project"
                      width="440"
                      align="center"
                      v-slot:default="scope">
                    <span v-if="languageS==='chinese'">{{scope.row.project}}</span>
                    <span v-else-if="languageS==='english'">{{scope.row.project_english}}</span>
                    <span v-else-if="languageS==='russian'">{{scope.row.project_russian}}</span>
                  </el-table-column>
                  <!--审核要求-->
                  <el-table-column
                      prop="require"
                      :label="pageVal.standardWork.requirement"
                      width="440"
                      align="center">
                  </el-table-column>
                  <!--编辑-->
                  <el-table-column
                      :label="pageVal.pdfDocument.operate"
                      align="center"
                      v-slot:default="scope">
                    <el-link @click="standardWorkSuperviseEditShow(2,scope)">
                      <i class="el-icon-edit"></i>
                    </el-link>
                    <el-link style="margin-left: 10px" @click="deleteData('standardWorkSupervise',scope)">
                      <i class="el-icon-delete"></i>
                    </el-link>
                  </el-table-column>
                </el-table>
              </el-tab-pane>
              <!--审核块-->
              <el-tab-pane :label="pageVal.standardModule.standardModule" name="standardModule">
                <div style="text-align: right;margin-right: 5px">
                  <el-link @click="standardModuleEditShow(1,null)" v-if="usePower===10">
                    <i class="el-icon-circle-plus"></i>
                  </el-link>
                </div>
                <div style="margin-top: 5px">
                  <el-table
                      :data="standardModuleData"
                      :key="Date.now()"
                      border
                      style="width: 100%"
                      :height="auditProblemHeight">
                    <!-- 展开行列 -->
                    <el-table-column type="expand" width="40">
                      <template slot-scope="props">
                        <el-table
                            :data="[props.row]"
                            border
                            style="width: 100%">
                          <!-- 关联文件1 -->
                          <el-table-column
                              prop="related_document1"
                              :label="pageVal.standardModule.related_document1"
                              align="center"
                              v-slot:default="scope">
                            <span v-if="languageS==='chinese' && scope.row.related_document1!==undefined && scope.row.related_document1.split('/').length===3">
                                {{scope.row.related_document1.split('/')[0]}}</span>
                            <span v-else-if="languageS==='english' && scope.row.related_document1!==undefined && scope.row.related_document1.split('/').length===3">
                                {{scope.row.related_document1.split('/')[1]}}</span>
                            <span v-else-if="languageS==='russian' && scope.row.related_document1!==undefined && scope.row.related_document1.split('/').length===3">
                                {{scope.row.related_document1.split('/')[2]}}</span>
                            <span v-else>{{scope.row.related_document1}}</span>
                          </el-table-column>
                          <!-- 关联文件2 -->
                          <el-table-column
                              prop="related_document2"
                              :label="pageVal.standardModule.related_document2"
                              align="center"
                              v-slot:default="scope">
                            <span v-if="languageS==='chinese' && scope.row.related_document2!==undefined && scope.row.related_document2.split('/').length===3">
                                {{scope.row.related_document2.split('/')[0]}}</span>
                            <span v-else-if="languageS==='english' && scope.row.related_document2!==undefined && scope.row.related_document2.split('/').length===3">
                                {{scope.row.related_document2.split('/')[1]}}</span>
                            <span v-else-if="languageS==='russian' && scope.row.related_document2!==undefined && scope.row.related_document2.split('/').length===3">
                                {{scope.row.related_document2.split('/')[2]}}</span>
                            <span v-else>{{scope.row.related_document2}}</span>
                          </el-table-column>
                          <!-- 关联文件3 -->
                          <el-table-column
                              prop="related_document3"
                              :label="pageVal.standardModule.related_document3"
                              align="center"
                              v-slot:default="scope">
                            <span v-if="languageS==='chinese' && scope.row.related_document3!==undefined && scope.row.related_document3.split('/').length===3">
                                {{scope.row.related_document3.split('/')[0]}}</span>
                            <span v-else-if="languageS==='english' && scope.row.related_document3!==undefined && scope.row.related_document3.split('/').length===3">
                                {{scope.row.related_document3.split('/')[1]}}</span>
                            <span v-else-if="languageS==='russian' && scope.row.related_document3!==undefined && scope.row.related_document3.split('/').length===3">
                                {{scope.row.related_document3.split('/')[2]}}</span>
                            <span v-else>{{scope.row.related_document3}}</span>
                          </el-table-column>
                          <!-- IFTA条款 -->
                          <el-table-column
                              prop="iFTA_clause"
                              :label="pageVal.standardModule.iFTA_clause"
                              align="center"
                              v-slot:default="scope">
                            <span v-if="languageS==='chinese' && scope.row.iFTA_clause!==undefined && scope.row.iFTA_clause.split('/').length===3">
                                {{scope.row.iFTA_clause.split('/')[0]}}</span>
                            <span v-else-if="languageS==='english' && scope.row.iFTA_clause!==undefined && scope.row.iFTA_clause.split('/').length===3">
                                {{scope.row.iFTA_clause.split('/')[1]}}</span>
                            <span v-else-if="languageS==='russian' && scope.row.iFTA_clause!==undefined && scope.row.iFTA_clause.split('/').length===3">
                                {{scope.row.iFTA_clause.split('/')[2]}}</span>
                            <span v-else>{{scope.row.iFTA_clause}}</span>
                          </el-table-column>
                          <!-- 公司体系文件关联 -->
                          <el-table-column
                              prop="system_document_association"
                              :label="pageVal.standardModule.system_document_association"
                              align="center"
                              v-slot:default="scope">
                            <span v-if="languageS==='chinese' && scope.row.system_document_association!==undefined && scope.row.system_document_association.split('/').length===3">
                                {{scope.row.system_document_association.split('/')[0]}}</span>
                            <span v-else-if="languageS==='english' && scope.row.system_document_association!==undefined && scope.row.system_document_association.split('/').length===3">
                                {{scope.row.system_document_association.split('/')[1]}}</span>
                            <span v-else-if="languageS==='russian' && scope.row.system_document_association!==undefined && scope.row.system_document_association.split('/').length===3">
                                {{scope.row.system_document_association.split('/')[2]}}</span>
                            <span v-else>{{scope.row.system_document_association}}</span>
                          </el-table-column>
                        </el-table>
                      </template>
                    </el-table-column>
                    <!-- 序号 -->
                    <el-table-column
                        :label="pageVal.pdfDocument.order"
                        width="60"
                        align="center"
                        v-slot:default="scope">
                      {{scope.$index+1}}
                    </el-table-column>
                    <!-- 标准块名称 -->
                    <el-table-column
                        prop="standard_module_name"
                        :label="pageVal.standardModule.standard_module_name"
                        align="center"
                        v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.standard_module_name!==undefined && scope.row.standard_module_name.split('/').length===3">
                        {{scope.row.standard_module_name.split('/')[0]}}</span>
                      <span v-else-if="languageS==='english' && scope.row.standard_module_name!==undefined && scope.row.standard_module_name.split('/').length===3">
                        {{scope.row.standard_module_name.split('/')[1]}}</span>
                      <span v-else-if="languageS==='russian' && scope.row.standard_module_name!==undefined && scope.row.standard_module_name.split('/').length===3">
                        {{scope.row.standard_module_name.split('/')[2]}}</span>
                      <span v-else>{{scope.row.standard_module_name}}</span>
                    </el-table-column>
                    <!-- 审核环节 -->
                    <el-table-column
                        prop="audit_link"
                        :label="pageVal.standardModule.audit_link"
                        align="center"
                        v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.audit_link!==undefined && scope.row.audit_link.split('/').length===3">
                        {{scope.row.audit_link.split('/')[0]}}</span>
                      <span v-else-if="languageS==='english' && scope.row.audit_link!==undefined && scope.row.audit_link.split('/').length===3">
                        {{scope.row.audit_link.split('/')[1]}}</span>
                      <span v-else-if="languageS==='russian' && scope.row.audit_link!==undefined && scope.row.audit_link.split('/').length===3">
                        {{scope.row.audit_link.split('/')[2]}}</span>
                      <span v-else>{{scope.row.audit_link}}</span>
                    </el-table-column>
                    <!-- 审核项目 -->
                    <el-table-column
                        prop="audit_project"
                        :label="pageVal.standardModule.audit_project"
                        align="center"
                        v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.audit_project!==undefined && scope.row.audit_project.split('/').length===3">
                        {{scope.row.audit_project.split('/')[0]}}</span>
                      <span v-else-if="languageS==='english' && scope.row.audit_project!==undefined && scope.row.audit_project.split('/').length===3">
                        {{scope.row.audit_project.split('/')[1]}}</span>
                      <span v-else-if="languageS==='russian' && scope.row.audit_project!==undefined && scope.row.audit_project.split('/').length===3">
                        {{scope.row.audit_project.split('/')[2]}}</span>
                      <span v-else>{{scope.row.audit_project}}</span>
                    </el-table-column>
                    <!-- 审核要求 -->
                    <el-table-column
                        prop="audit_requirement"
                        :label="pageVal.standardModule.audit_requirement"
                        header-align="center"
                        v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.audit_requirement!==undefined && scope.row.audit_requirement.split('/').length===3">
                        {{scope.row.audit_requirement.split('/')[0]}}</span>
                      <span v-else-if="languageS==='english' && scope.row.audit_requirement!==undefined && scope.row.audit_requirement.split('/').length===3">
                        {{scope.row.audit_requirement.split('/')[1]}}</span>
                      <span v-else-if="languageS==='russian' && scope.row.audit_requirement!==undefined && scope.row.audit_requirement.split('/').length===3">
                        {{scope.row.audit_requirement.split('/')[2]}}</span>
                      <span v-else>{{scope.row.audit_requirement}}</span>
                    </el-table-column>
                    <!-- 问题等级 -->
                    <el-table-column
                        prop="problem_level"
                        :label="pageVal.standardModule.problem_level"
                        align="center"
                        v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.problem_level!==undefined && scope.row.problem_level.split('/').length===3">
                        {{scope.row.problem_level.split('/')[0]}}</span>
                      <span v-else-if="languageS==='english' && scope.row.problem_level!==undefined && scope.row.problem_level.split('/').length===3">
                        {{scope.row.problem_level.split('/')[1]}}</span>
                      <span v-else-if="languageS==='russian' && scope.row.problem_level!==undefined && scope.row.problem_level.split('/').length===3">
                        {{scope.row.problem_level.split('/')[2]}}</span>
                      <span v-else>{{scope.row.problem_level}}</span>
                    </el-table-column>
                    <!-- 用时 -->
                    <el-table-column
                        prop="time"
                        :label="pageVal.standardModule.time"
                        align="center"
                        width="55px">
                    </el-table-column>
                    <!-- 责任科室 -->
                    <el-table-column
                        prop="section"
                        :label="pageVal.standardModule.section"
                        align="center"
                        v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.section!==undefined && scope.row.section.split('/').length===3">
                        {{scope.row.section.split('/')[0]}}</span>
                      <span v-else-if="languageS==='english' && scope.row.section!==undefined && scope.row.section.split('/').length===3">
                        {{scope.row.section.split('/')[1]}}</span>
                      <span v-else-if="languageS==='russian' && scope.row.section!==undefined && scope.row.section.split('/').length===3">
                        {{scope.row.section.split('/')[2]}}</span>
                      <span v-else>{{scope.row.section}}</span>
                    </el-table-column>
                    <!-- 操作 -->
                    <el-table-column
                        :label="pageVal.pdfDocument.operate"
                        width="70"
                        align="center"
                        v-slot:default="scope">
                      <el-link style="margin-left: 15px;margin-right: 15px" @click="instructionEditShow(1,scope)">
                        <i class="el-icon-reading"></i>
                      </el-link>
                      <el-link style="margin-right: 8px" @click="standardModuleEditShow(2,scope)" v-if="usePower===10">
                        <i class="el-icon-edit"></i>
                      </el-link>
                      <el-link  @click="deleteData('deleteStandardModule',scope)" v-if="usePower===10">
                        <i class="el-icon-delete"></i>
                      </el-link>
                    </el-table-column>
                  </el-table>
                  <!-- 分页控件 -->
                  <el-pagination
                      @size-change="handleSizeChangeStandardModule"
                      @current-change="handleCurrentChangeStandardModule"
                      :current-page="standardModulePagination.currentPage"
                      :page-sizes="[10, 20, 50, 100]"
                      :page-size="standardModulePagination.pageSize"
                      layout="total, sizes, prev, pager, next, jumper"
                      :total="standardModulePagination.total">
                  </el-pagination>
                </div>
              </el-tab-pane>
              <!--审核问题管理-->
              <el-tab-pane :label="pageVal.problemManagement.problemManagement" name="auditProblemManagement">
                <div style="text-align: right;margin-right: 5px">
                  <el-link @click="auditProblemEditShow(1,null)" v-if="usePower===10">
                    <i class="el-icon-circle-plus"></i>
                  </el-link>
                </div>
                <div style="margin-top: 5px">
                  <el-table
                      :data="toExamineProblemData"
                      border
                      style="width: 100%"
                      :height="auditProblemHeight">
                    <!-- 展开行列 -->
                    <el-table-column type="expand" width="40">
                      <template slot-scope="props">
                        <el-table
                            :data="[props.row]"
                            border
                            style="width: 100%">
                          <el-table-column
                              prop="problem_type"
                              :label="pageVal.problemManagement.problem_type"
                              align="center"
                              v-slot:default="scope">
                            <span
                                v-if="languageS==='chinese' && scope.row.problem_type!==undefined && scope.row.problem_type.split('/').length===3">
                                {{scope.row.problem_type.split('/')[0]}}
                            </span>
                            <span
                                v-else-if="languageS==='english' && scope.row.problem_type!==undefined && scope.row.problem_type.split('/').length===3">
                                {{scope.row.problem_type.split('/')[1]}}
                            </span>
                            <span
                                v-else-if="languageS==='russian' && scope.row.problem_type!==undefined && scope.row.problem_type.split('/').length===3">
                                {{scope.row.problem_type.split('/')[2]}}
                            </span>
                            <span v-else>
                                {{scope.row.problem_type}}
                            </span>
                          </el-table-column>
                          <el-table-column
                              prop="problem_classification"
                              :label="pageVal.problemManagement.problem_classification"
                              align="center"
                              v-slot:default="scope">
                            <span
                                v-if="languageS==='chinese' && scope.row.problem_classification!==undefined && scope.row.problem_classification.split('/').length===3">
                                {{scope.row.problem_classification.split('/')[0]}}
                            </span>
                            <span
                                v-else-if="languageS==='english' && scope.row.problem_classification!==undefined && scope.row.problem_classification.split('/').length===3">
                                {{scope.row.problem_classification.split('/')[1]}}
                            </span>
                            <span
                                v-else-if="languageS==='russian' && scope.row.problem_classification!==undefined && scope.row.problem_classification.split('/').length===3">
                                {{scope.row.problem_classification.split('/')[2]}}
                            </span>
                            <span v-else>
                                {{scope.row.problem_classification}}
                            </span>
                          </el-table-column>
                          <el-table-column
                              prop="process"
                              :label="pageVal.problemManagement.process"
                              align="center"
                              v-slot:default="scope">
                            <span
                                v-if="languageS==='chinese' && scope.row.process!==undefined && scope.row.process.split('/').length===3">
                                {{scope.row.process.split('/')[0]}}
                            </span>
                            <span
                                v-else-if="languageS==='english' && scope.row.process!==undefined && scope.row.process.split('/').length===3">
                                {{scope.row.process.split('/')[1]}}
                            </span>
                            <span
                                v-else-if="languageS==='russian' && scope.row.process!==undefined && scope.row.process.split('/').length===3">
                                {{scope.row.process.split('/')[2]}}
                            </span>
                            <span v-else>
                                {{scope.row.process}}
                            </span>
                          </el-table-column>
                          <el-table-column
                              prop="file_name"
                              :label="pageVal.problemManagement.file_name"
                              align="center">
                          </el-table-column>
                          <el-table-column
                              prop="clause_number"
                              :label="pageVal.problemManagement.clause_number"
                              align="center">
                          </el-table-column>
                        </el-table>
                      </template>
                    </el-table-column>
                    <el-table-column
                        :label="pageVal.pdfDocument.order"
                        width="60"
                        align="center"
                        v-slot:default="scope">
                      {{scope.$index+1}}
                    </el-table-column>
                    <el-table-column
                        prop="audit_source"
                        :label="pageVal.problemManagement.audit_source"
                        align="center"
                        v-slot:default="scope">
                      <span
                          v-if="languageS==='chinese' && scope.row.audit_source!==undefined && scope.row.audit_source.split('/').length===3">
                        {{scope.row.audit_source.split('/')[0]}}
                      </span>
                      <span
                          v-else-if="languageS==='english' && scope.row.audit_source!==undefined && scope.row.audit_source.split('/').length===3">
                        {{scope.row.audit_source.split('/')[1]}}
                      </span>
                      <span
                          v-else-if="languageS==='russian' && scope.row.audit_source!==undefined && scope.row.audit_source.split('/').length===3">
                        {{scope.row.audit_source.split('/')[2]}}
                      </span>
                      <span
                          v-else>
                        {{scope.row.audit_source}}
                      </span>
                    </el-table-column>
                    <el-table-column
                        prop="audit_date"
                        :label="pageVal.problemManagement.audit_date"
                        align="center">
                    </el-table-column>
                    <el-table-column
                        prop="auditor"
                        :label="pageVal.problemManagement.auditor"
                        align="center">
                    </el-table-column>
                    <el-table-column
                        prop="problem_description"
                        :label="pageVal.problemManagement.problem_description"
                        align="center"
                        v-slot:default="scope"
                        :show-overflow-tooltip="true">
                      <span
                          v-if="languageS==='chinese' && scope.row.problem_description!==undefined && scope.row.problem_description.split('|*|').length===3">
                        {{scope.row.problem_description.split('|*|')[0]}}
                      </span>
                      <span
                          v-else-if="languageS==='english' && scope.row.problem_description!==undefined && scope.row.problem_description.split('|*|').length===3">
                        {{scope.row.problem_description.split('|*|')[1]}}
                      </span>
                      <span
                          v-else-if="languageS==='russian' && scope.row.problem_description!==undefined && scope.row.problem_description.split('|*|').length===3">
                        {{scope.row.problem_description.split('|*|')[2]}}
                      </span>
                      <span
                          v-else>
                        {{scope.row.problem_description}}
                      </span>
                    </el-table-column>
                    <el-table-column
                        prop="department"
                        :label="pageVal.problemManagement.department"
                        align="center"
                        v-slot:default="scope">
                      <span
                          v-if="languageS==='chinese' && scope.row.department!==undefined && scope.row.department.split('/').length===3">
                        {{scope.row.department.split('/')[0]}}
                      </span>
                      <span
                          v-else-if="languageS==='english' && scope.row.department!==undefined && scope.row.department.split('/').length===3">
                        {{scope.row.department.split('/')[1]}}
                      </span>
                      <span
                          v-else-if="languageS==='russian' && scope.row.department!==undefined && scope.row.department.split('/').length===3">
                        {{scope.row.department.split('/')[2]}}
                      </span>
                      <span
                          v-else>
                        {{scope.row.department}}
                      </span>
                    </el-table-column>
                    <el-table-column
                        prop="measure_maker"
                        :label="pageVal.problemManagement.measure_maker"
                        align="center">
                    </el-table-column>
                    <el-table-column
                        prop="effect_confirmation"
                        :label="pageVal.problemManagement.effect_confirmation"
                        align="center"
                        v-slot:default="scope">
                      <span v-if="languageS==='chinese' && scope.row.effect_confirmation!==undefined && scope.row.effect_confirmation.split('/').length===3">
                        {{scope.row.effect_confirmation.split('/')[0]}}
                      </span>
                      <span v-else-if="languageS==='english' && scope.row.effect_confirmation!==undefined && scope.row.effect_confirmation.split('/').length===3">
                        {{scope.row.effect_confirmation.split('/')[1]}}
                      </span>
                      <span v-else-if="languageS==='russian' && scope.row.effect_confirmation!==undefined && scope.row.effect_confirmation.split('/').length===3">
                        {{scope.row.effect_confirmation.split('/')[2]}}
                      </span>
                      <span v-else>{{scope.row.effect_confirmation}}</span>
                    </el-table-column>
                    <el-table-column
                        prop="problem_close"
                        :label="pageVal.problemManagement.problem_close"
                        align="center">
                    </el-table-column>
                    <!-- 操作 -->
                    <el-table-column
                        :label="pageVal.pdfDocument.operate"
                        width="70"
                        align="center"
                        v-slot:default="scope">
                      <el-link style="margin-right: 12px" @click="problemManagementEditShow(1,scope)">
                        <i class="el-icon-view"></i>
                      </el-link>
                      <el-link  @click="problemPictureEditShow(scope)" v-if="usePower===10">
                        <i class="el-icon-folder-opened"></i>
                      </el-link>
                      <el-link style="margin-right: 12px" @click="auditProblemEditShow(2,scope)" v-if="usePower===10">
                        <i class="el-icon-edit"></i>
                      </el-link>
                      <el-link  @click="deleteData('deleteAuditProblem',scope)" v-if="usePower===10">
                        <i class="el-icon-delete"></i>
                      </el-link>
                    </el-table-column>
                  </el-table>
                  <!-- 分页控件 -->
                  <el-pagination
                      @size-change="handleSizeChange"
                      @current-change="handleCurrentChange"
                      :current-page="auditProblemPagination.currentPage"
                      :page-sizes="[10, 20, 50, 100]"
                      :page-size="auditProblemPagination.pageSize"
                      layout="total, sizes, prev, pager, next, jumper"
                      :total="auditProblemPagination.total">
                  </el-pagination>
                </div>
              </el-tab-pane>
              <el-tab-pane label="模型说明" name="third">模型说明</el-tab-pane>
            </el-tabs>
            </div>
            <!-- 初始空状态 -->
            <el-empty
                v-else
                :description="main.description"
                :image-size="160"
                style="margin: 45px auto;">
            </el-empty>
          </el-main>
          <el-footer style="height: 44px">
            <el-button plain size="mini" @click="languageSelect('chinese')">中  文</el-button>
            <el-button plain size="mini" @click="languageSelect('russian')">Русский язык</el-button>
            <el-button plain size="mini" @click="languageSelect('english')">English</el-button>
          </el-footer>
        </el-container>
      </el-container>
    </el-container>

    <!--弹窗放置区-->
    <!--删除提醒的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="deleteDialog"
        width="400px"
        :before-close="handleClose">
      <span>{{main.sureToDelete}}</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="deleteDialog = false" size="mini">{{main.cancel}}</el-button>
        <el-button type="primary" size="mini" @click="deleteDataOk">{{main.ok}}</el-button>
      </span>
    </el-dialog>

    <!--查看pdf文件的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="pdfShowDialog"
        width="80%">
      <iframe
          :src="pdfUrl"
          width="100%"
          height="600px"
          style="border: none;">
      </iframe>
    </el-dialog>
    <!-- 编辑PDF文档弹窗 -->
    <el-dialog
        title="编辑PDF文档"
        :visible.sync="editDocumentDialog"
        width="400px"
        :before-close="handleClose">
      <div style="text-align: center">
        <el-form
            :model="editPdfDocumentForm"
            label-width="120px"
            label-position="left"
            ref="editPdfDocumentFormRef"
            :rules="pdfDocumentRules">

          <el-form-item :label="pageVal.pdfDocument.number" prop="number" required>
            <el-input v-model="editPdfDocumentForm.number"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.pdfDocument.name" prop="name" required>
            <el-input v-model="editPdfDocumentForm.name"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.pdfDocument.name_english" prop="name_english" required>
            <el-input v-model="editPdfDocumentForm.name_english"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.pdfDocument.name_russian" prop="name_russian" required>
            <el-input v-model="editPdfDocumentForm.name_russian"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.pdfDocument.version_number" prop="version_number" required>
            <el-input v-model="editPdfDocumentForm.version_number"></el-input>
          </el-form-item>

          <el-upload
              ref="editPdfUploader"
              class="upload-demo"
              action="#"
              :auto-upload="false"
              :on-change="handleEditFileChange"
              :on-remove="handleRemove"
              :before-remove="beforeRemove"
              :limit="1"
              :on-exceed="handleExceed"
              :file-list="editFileList"
              :before-upload="beforeUpload"
              accept=".pdf">
            <el-button size="medium" type="primary">点击替换PDF文件</el-button>
            <div slot="tip" class="el-upload__tip" style="font-size: 13px">
              <i class="el-icon-info" style="color: red"></i>
              只能上传PDF文件
            </div>
          </el-upload>
          <div style="margin-top: 20px; text-align: right">
            <el-button @click="editDocumentDialog = false">取消</el-button>
            <el-button
                type="primary"
                @click="submitEditUpload"
                :disabled="!isEditFormValid">
              确认修改
            </el-button>
          </div>
        </el-form>
      </div>
    </el-dialog>

    <!-- 编辑表单弹窗 -->
    <el-dialog
        title="编辑表单"
        :visible.sync="editFormDialog"
        width="400px"
        :before-close="handleClose">
      <div style="text-align: center">
        <el-form
            :model="editFormDocumentForm"
            label-width="120px"
            label-position="left"
            ref="editFormDocumentFormRef"
            :rules="formDocumentRules">

          <el-form-item :label="pageVal.downloadForm.number" prop="number" required>
            <el-input v-model="editFormDocumentForm.number"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.downloadForm.name" prop="name" required>
            <el-input v-model="editFormDocumentForm.name"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.downloadForm.name_english" prop="name_english" required>
            <el-input v-model="editFormDocumentForm.name_english"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.downloadForm.name_russian" prop="name_russian" required>
            <el-input v-model="editFormDocumentForm.name_russian"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.pdfDocument.version_number" prop="version_number" required>
            <el-input v-model="editFormDocumentForm.version_number"></el-input>
          </el-form-item>

          <el-upload
              ref="editFormUploader"
              class="upload-demo"
              action="#"
              :auto-upload="false"
              :on-change="handleEditFileChangeForm"
              :on-remove="handleRemoveForm"
              :before-remove="beforeRemoveForm"
              :limit="1"
              :on-exceed="handleExceedForm"
              :file-list="editFileListForm"
              :before-upload="beforeUploadForm">
            <el-button size="medium" type="primary">点击替换表单</el-button>
          </el-upload>
          <div style="margin-top: 20px; text-align: right">
            <el-button @click="editFormDialog = false">取消</el-button>
            <el-button
                type="primary"
                @click="submitEditUploadForm"
                :disabled="!isEditFormValidForm">
              确认修改
            </el-button>
          </div>
        </el-form>
      </div>
    </el-dialog>

    <!--修改标准作业监察清单-->
    <el-dialog
        :title="titleUse"
        :visible.sync="standardWorkSuperviseDialog"
        width="80%"
        top="20px"
        :before-close="handleClose">
      <el-form  :model="standardWorkSuperviseForm" label-width="200px">
        <el-form-item label="车间名称：">
          <el-select v-model="standardWorkSuperviseForm.workshop" :placeholder="main.select" style="width: 100%">
            <el-option
                v-for="item in workShopOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="线体名称：">
          <el-select v-model="standardWorkSuperviseForm.line" :placeholder="main.select" style="width: 100%">
            <el-option
                v-for="item in lineOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="工序：">
          <el-select v-model="standardWorkSuperviseForm.op" :placeholder="main.select" style="width: 100%">
            <el-option
                v-for="item in opOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="审核项目："><!--输入框为多行，且超出行后继续增加，右侧出现可拖动进度条-->
          <el-input
              type="textarea"
              :rows="1"
              placeholder="请输入内容"
              v-model="standardWorkSuperviseForm.project">
          </el-input>
          </el-form-item>
        <el-form-item label="审核项目_英："><!--输入框为多行，且超出行后继续增加，右侧出现可拖动进度条-->
          <el-input
              type="textarea"
              :rows="1"
              placeholder="请输入内容"
              v-model="standardWorkSuperviseForm.project_english">
          </el-input>
        </el-form-item>
        <el-form-item label="审核项目_俄："><!--输入框为多行，且超出行后继续增加，右侧出现可拖动进度条-->
            <el-input
                type="textarea"
                :rows="1"
                placeholder="请输入内容"
                v-model="standardWorkSuperviseForm.project_russian">
            </el-input>
        </el-form-item>
        <el-form-item label="审核要求："><!--输入框为多行，且超出行后继续增加，右侧出现可拖动进度条-->
          <el-input
              type="textarea"
              :rows="1"
              placeholder="请输入内容"
              v-model="standardWorkSuperviseForm.require">
          </el-input>
        </el-form-item>
        <el-form-item label="审核要求_英："><!--输入框为多行，且超出行后继续增加，右侧出现可拖动进度条-->
          <el-input
              type="textarea"
              :rows="1"
              placeholder="请输入内容"
              v-model="standardWorkSuperviseForm.require_english">
          </el-input>
        </el-form-item>
        <el-form-item label="审核要求_俄："><!--输入框为多行，且超出行后继续增加，右侧出现可拖动进度条-->
          <el-input
              type="textarea"
              :rows="1"
              placeholder="请输入内容"
              v-model="standardWorkSuperviseForm.require_russian">
          </el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
    <el-button @click="standardWorkSuperviseDialog = false">{{main.cancel}}</el-button>
    <el-button type="primary" @click="standardWorkSuperviseEditOk">确{{main.ok}}</el-button>
  </span>
    </el-dialog>

    <!--新增一条或编辑某一条标准块-->
    <el-dialog
        :title="titleUse"
        :visible.sync="standardModuleDialog"
        width="1150px"
        :before-close="handleClose">
      <el-form :inline="true" ref="standardModuleForm" :model="standardModuleForm" label-width="140px" size="small">
        <div style="text-align: left">
          <el-form-item :label="pageVal.standardModule.standard_module_name" required>
            <el-input v-model="standard_module_name_chinese"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.standardModule.standard_module_name_english" required>
            <el-input v-model="standard_module_name_english"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.standardModule.standard_module_name_russian" required>
            <el-input v-model="standard_module_name_russian"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.standardModule.audit_link" required>
            <el-select v-model="standardModuleForm.audit_link" style="width: 92%" :placeholder="main.select">
              <el-option
                  v-for="item in problemClassificationOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.standardModule.audit_project" required>
            <el-input v-model="audit_project_chinese"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.standardModule.audit_project_english" required>
            <el-input v-model="audit_project_english"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.standardModule.audit_project_russian" required>
            <el-input v-model="audit_project_russian"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.standardModule.audit_requirement" required>
            <el-input v-model="audit_requirement_chinese"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.standardModule.audit_requirement_english" required>
            <el-input v-model="audit_requirement_english"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.standardModule.audit_requirement_russian" required>
            <el-input v-model="audit_requirement_russian"></el-input>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.standardModule.problem_level" required>
            <el-select v-model="standardModuleForm.problem_level" style="width: 92%" :placeholder="main.select">
              <el-option label="建议项/Observation/Рекомендация" value="建议项/Observation/Рекомендация"></el-option>
              <el-option label="一般不符合项/Minor Nonconformity/Незначащее несоответствие" value="一般不符合项/Minor Nonconformity/Незначащее несоответствие"></el-option>
              <el-option label="严重不符合项/Major Nonconformity/Значащее несоответствие" value="严重不符合项/Major Nonconformity/Значащее несоответствие"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="pageVal.standardModule.time" required>
            <el-input v-model="standardModuleForm.time"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.standardModule.section" required>
            <el-select v-model="standardModuleForm.section" style="width: 92%" :placeholder="main.select">
              <el-option
                  v-for="item in departmentOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.standardModule.related_document1" required>
            <el-select v-model="standardModuleForm.related_document1" style="width: 92%" :placeholder="main.select">
              <el-option
                  v-for="item in relatedDocumentOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="pageVal.standardModule.related_document2" required>
            <el-select v-model="standardModuleForm.related_document2" style="width: 92%" :placeholder="main.select">
              <el-option
                  v-for="item in relatedDocumentOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="pageVal.standardModule.related_document3" required>
            <el-select v-model="standardModuleForm.related_document3" style="width: 92%" :placeholder="main.select">
              <el-option
                  v-for="item in relatedDocumentOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
        <div style="text-align: left">
          <el-form-item :label="pageVal.standardModule.iFTA_clause" required>
            <el-input v-model="standardModuleForm.iFTA_clause"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.standardModule.system_document_association" required>
            <el-select v-model="standardModuleForm.system_document_association" style="width: 92%" :placeholder="main.select">
              <el-option
                  v-for="item in companySystemDocumentOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="standardModuleDialog = false" size="mini">{{main.cancel}}</el-button>
        <el-button type="primary" @click="standardModuleOk" size="mini">{{main.ok}}</el-button>
      </span>
    </el-dialog>

    <!--编辑审核块指导书的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="instructionDialog"
        width="1000px"
        :before-close="handleClose">
      <div style="flex-grow: 1;
                  border: 1px solid blue;
                  box-sizing: border-box;
                  margin-left: 8px;
                  padding: 8px;
                  display: flex;
                  width: 100%">
        <div style="flex: 1;scroll-margin-right: 8px; border: 1px solid #d3d3d3;">
          <div style="text-align: left;margin-left: 8px;margin-bottom: 5px;margin-top: 5px">
            <el-link :style="{marginRight:'5px',backgroundColor:workBookHeard1 , color:workBookHeardColour1, padding: '4px 10px', borderRadius: '5px' }"
                     @click="workBookHeard(1)" style="margin-left: 8px">{{pageVal.standardModule.instruction}}</el-link>
            <span>|</span>
            <el-link :style="{marginRight:'5px',backgroundColor:workBookHeard2 , color:workBookHeardColour2, padding: '4px 10px', borderRadius: '5px' }"
                     @click="workBookHeard(2)">{{pageVal.standardModule.manHour}}</el-link>
          </div>
          <hr>
          <div v-if="workBookHeardUse===1">
            <el-table
                :data="workBook"
                border
                style="width: 100%"
                height="65vh"
                @row-click="workBookRowClick"
                :row-style="workBookRowClassName">
              <el-table-column
                  type="expand"
                  v-slot:default="props">
                <div style="margin-right: 10px;margin-left: 20px">
                  <span>{{pageVal.attentionPointsExplanation}}</span>
                  <span v-if="languageS==='chinese' && props.row.problem.split('|*|').length===3" v-html="props.row.problem.split('|*|')[0]"></span>
                  <span v-else-if="languageS==='english' && props.row.problem.split('|*|').length===3" v-html="props.row.problem.split('|*|')[1]"></span>
                  <span v-else-if="languageS==='russian' && props.row.problem.split('|*|').length===3" v-html="props.row.problem.split('|*|')[2]"></span>
                  <span v-else>{{props.row.problem}}</span>
                </div>
              </el-table-column>
              <el-table-column
                  prop="id"
                  :label="pageVal.pdfDocument.order"
                  width="50">
              </el-table-column>
              <el-table-column
                  prop="work"
                  :label="pageVal.standardModule.stepContent"
                  v-slot:default="scope">
                <span v-if="languageS==='chinese' && scope.row.work.split('|*|').length===3">{{scope.row.work.split('|*|')[0]}}</span>
                <span v-else-if="languageS==='english' && scope.row.work.split('|*|').length===3">{{scope.row.work.split('|*|')[1]}}</span>
                <span v-else-if="languageS==='russian' && scope.row.work.split('|*|').length===3">{{scope.row.work.split('|*|')[2]}}</span>
                <span v-else>{{scope.row.work}}</span>
                <el-link style="margin-left: 10px" @click="editWorkBookShow(1,scope)" v-if="usePower===10"><i class="el-icon-top"></i></el-link>
                <el-link style="margin-left: 10px" @click="editWorkBookShow(2,scope)" v-if="usePower===10"><i class="el-icon-bottom"></i></el-link>
                <el-link style="margin-left: 10px" @click="editWorkBookShow(3,scope)" v-if="usePower===10"><i class="el-icon-edit"></i></el-link>
                <el-link style="margin-left: 10px" @click="editWorkBookShow(4,scope)" v-if="usePower===10"><i class="el-icon-picture-outline"></i></el-link>
                <el-link style="margin-left: 10px" @click="editWorkBookShow(5,scope)" v-if="usePower===10"><i class="el-icon-video-camera"></i></el-link>
                <el-link style="margin-left: 10px" @click="editWorkBookShow(6,scope)" v-if="usePower===10"><i class="el-icon-delete"></i></el-link>
              </el-table-column>
            </el-table>
          </div>
          <div v-if="workBookHeardUse===2" ref="myChartBor" style="height: 57vh;width:35vw">
          </div>
        </div>
        <div style="flex: 1;border: 1px solid #d3d3d3;">
          <div style="text-align: left;margin-left: 8px;margin-bottom: 5px;margin-top: 5px">
            <el-link
                type="primary"
                @click="switchVideo(1)"
                :style="{ backgroundColor:videoAndImage1 , color:videoAndImageColor1 , padding: '4px 10px', borderRadius: '5px' }">{{pageVal.standardModule.picture}}</el-link>
            <el-link
                type="primary"
                style="margin-left: 20px"
                @click="switchVideo(2)"
                :style="{ backgroundColor:videoAndImage2 , color:videoAndImageColor2 , padding: '4px 10px', borderRadius: '5px' }">{{pageVal.standardModule.video}}</el-link>
          </div>
          <hr>
          <div style="height: 62vh;margin-top: 8px">
            <div class="block" v-if="switchVideoUse===1">
              <el-carousel trigger="click" height="62vh">
                <el-carousel-item v-for="(item, index) in itemView" :key="index">
                  <el-image
                      style="width: 100%; height: 100%"
                      :src="item"
                      fit='contain'
                      @click="handleImageClick(item)"></el-image>
                  <el-link></el-link>
                </el-carousel-item>
              </el-carousel>
            </div>
            <div class="block" v-else-if="switchVideoUse===2" style="height: 100%">
              <el-carousel trigger="click" height="62vh" :autoplay="false">
                <el-carousel-item v-for="(item, index) in itemViewVideo" :key="index">
                  <video
                      style="width: 100%; height: 100%"
                      :src="item"
                      controls></video>
                </el-carousel-item>
              </el-carousel>
            </div>
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="instructionDialog = false" size="small">{{main.cancel}}</el-button>
      </span>
    </el-dialog>
    <!--编辑指导书步骤的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="stepEditDialog"
        width="50%"
        :before-close="handleClose">
      <div style="text-align: left">
        <span style="font-size: 18px">{{pageVal.standardModule.stepContent}}</span>
        <el-input :placeholder="main.chinese"
                  v-model="inputText1"
                  style="width: 100%; margin-top: 8px">
        </el-input>
      </div>
      <div style="margin-top: 10px;text-align: left">
        <el-input :placeholder="main.english"
                  v-model="inputText2"
                  style="width: 100%; margin-top: 8px">
        </el-input>
      </div>
      <div style="margin-top: 10px;text-align: left">
        <el-input :placeholder="main.russian"
                  v-model="inputText3"
                  style="width: 100%; margin-top: 8px">
        </el-input>
      </div>
      <!-- 关注点富文本编辑器（中/英/俄） -->
      <div style="margin-top: 10px;text-align: left">
        <span style="font-size: 18px">{{pageVal.standardModule.attentionPoint}}</span>
        <el-tabs v-model="pointsActiveTab" type="card" style="margin-top: 8px">
          <el-tab-pane :label="main.chinese" name="chinese">
            <div ref="pointsChineseEditor" class="editor-container"></div>
          </el-tab-pane>
          <el-tab-pane :label="main.english" name="english">
            <div ref="pointsEnglishEditor" class="editor-container"></div>
          </el-tab-pane>
          <el-tab-pane :label="main.russian" name="russian">
            <div ref="pointsRussianEditor" class="editor-container"></div>
          </el-tab-pane>
        </el-tabs>
      </div>
      <div style="float:left; text-align: left;margin-top: 10px">
        <span style="margin-right: 20px;font-size: 18px">{{pageVal.standardModule.workTime}}:</span><el-input-number v-model="inputNum" :min="0" :max="3600"></el-input-number>
      </div>
      <span slot="footer" class="dialog-footer">
    <el-button @click="stepEditDialog = false">{{main.cancel}}</el-button>
    <el-button type="primary" @click="editWorkBookOk">{{main.ok}}</el-button>
  </span>
    </el-dialog>
    <!--点击上传照片-->
    <el-dialog
        :visible.sync="dialogPicture"
        :title="titleUse">
      <div style="margin-top: 10px;text-align: center; border: 1px solid #0269fa;padding: 10px">
        <el-upload
            action="http://10.255.96.48:3499/russiaEngine/"
            list-type="picture-card"
            :auto-upload="false"
            :on-change="(file, fileList1) => saveFileAnnex1(file, fileList1)"
            :file-list="pictureFileList"
            accept=".jpg,.jpeg,.png,.gif,.bmp,.webp,.svg">
          <i slot="default" class="el-icon-plus"></i>
          <div slot="file" slot-scope="{file}">
            <img
                class="el-upload-list__item-thumbnail"
                :src="file.url" alt="">
            <span class="el-upload-list__item-actions">
              <span class="el-upload-list__item-preview" @click="handlePictureCardPreview1(file)">
              <i class="el-icon-zoom-in"></i>
            </span>
              <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
              <i class="el-icon-download"></i>
            </span>
              <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemovePicture1(file)">
              <i class="el-icon-delete"></i>
            </span>
            </span>
          </div>
        </el-upload>
      </div>
    </el-dialog>
    <!--点击上传视频-->
    <el-dialog
        :visible.sync="dialogVideo"
        :title="titleUse">
      <div style="margin-top: 10px;text-align: center; border: 1px solid #0269fa;padding: 10px">
        <el-upload
            action="http://10.255.96.48:3499/russiaEngine/"
            list-type="picture-card"
            :auto-upload="false"
            :on-change="(file, fileList) => saveFileAnnex2(file, fileList)"
            :file-list="videoList"
            accept=".mp4,.avi,.mov,.wmv,.flv,.webm,.mkv"
            v-loading="loading"
            element-loading-text="拼命上传中">
          <i slot="default" class="el-icon-plus"></i>
          <div slot="file" slot-scope="{file}">
            <video width="100%"
                   height="100%"
                   :src="file.url"
                   controls>
            </video>
            <span class="el-upload-list__item-actions">
              <span class="el-upload-list__item-preview" @click="handlePictureCardPreview1(file)">
                <i class="el-icon-zoom-in"></i>
              </span>
              <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
                <i class="el-icon-download"></i>
              </span>
              <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemovePicture2(file)">
                <i class="el-icon-delete"></i>
              </span>
            </span>
          </div>
        </el-upload>
      </div>
    </el-dialog>
    <!--点击上传照片中的放大按钮，查看照片-->
    <el-dialog :visible.sync="enlargeImageDialog">
      <!--图片-->
      <div v-if="isImageFile===1">
        <img width="100%" :src="dialogImageUrl" alt="">
      </div>
      <!--视频-->
      <div v-else-if="isImageFile===2">
        <video
            style="width: 100%; height: 100%"
            :src="dialogImageUrl"
            controls></video>
      </div>
    </el-dialog>

    <!--录入审核问题的弹窗-->
    <el-dialog
        :title="titleUse"
        v-if="problemDialog"
        :visible.sync="problemDialog"
        width="680px"
        :before-close="handleClose">
      <div>
        <el-form :inline="true" :model="toExamineProblemForm" class="demo-form-inline" label-width="100px">
          <div>
            <el-form-item :label="pageVal.problemManagement.audit_source" required>
              <el-select v-model="toExamineProblemForm.audit_source" filterable :placeholder="main.select" style="width: 180px">
                <el-option
                    v-for="item in auditSourceOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item :label="pageVal.problemManagement.process" required>
              <el-select v-model="toExamineProblemForm.process" filterable :placeholder="main.select" style="width: 180px">
                <el-option
                    v-for="item in processOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </div>
          <div>
            <el-form-item :label="pageVal.problemManagement.problem_type" required>
              <el-select v-model="toExamineProblemForm.problem_type" filterable :placeholder="main.select" style="width: 180px">
                <el-option
                    v-for="item in problemTypeOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item :label="pageVal.problemManagement.problem_classification" required>
              <el-select v-model="toExamineProblemForm.problem_classification" filterable :placeholder="main.select" style="width: 180px">
                <el-option
                    v-for="item in problemClassificationOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </div>
          <div>
            <el-form-item :label="pageVal.problemManagement.audit_date" required>
              <el-date-picker
                  v-model="toExamineProblemForm.audit_date"
                  type="date"
                  :placeholder="main.selectDate"
                  value-format="yyyy-MM-dd"
                  style="width: 180px">
              </el-date-picker>
            </el-form-item>
            <el-form-item :label="pageVal.problemManagement.auditor" required>
              <el-input v-model="toExamineProblemForm.auditor" style="width: 180px"></el-input>
            </el-form-item>
          </div>
          <div>
            <el-form-item :label="pageVal.problemManagement.file_name">
              <el-select v-model="toExamineProblemForm.file_name" filterable :placeholder="main.select" style="width: 180px">
                <el-option
                    v-for="item in systemOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item :label="pageVal.problemManagement.clause_number">
              <el-input v-model="toExamineProblemForm.clause_number" style="width: 180px"></el-input>
            </el-form-item>
          </div>
          <div>
            <el-form-item :label="pageVal.problemManagement.department" required>
              <el-select v-model="toExamineProblemForm.department" filterable :placeholder="main.select" style="width: 180px">
                <el-option
                    v-for="item in departmentOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item :label="pageVal.problemManagement.measure_maker" required>
              <el-input v-model="toExamineProblemForm.measure_maker" style="width: 180px"></el-input>
            </el-form-item>
          </div>
          <div style="text-align: left">
            <el-form-item :label="pageVal.problemManagement.problem_description" required>
              <text-translate
                  :language-s="languageS"
                  :rich-text-translate-data="problemDescription"
                  @content-change="problemDescriptionTranslate">
              </text-translate>
            </el-form-item>
          </div>
<!--          <div>-->
<!--            <el-form-item label="审核人：">-->
<!--              <el-input v-model="toExamineProblemForm.prevention_responsible_person" style="width: 150px"></el-input>-->
<!--            </el-form-item>-->
<!--            <el-form-item label="批准人：">-->
<!--              <el-input v-model="toExamineProblemForm.prevention_responsible_person" style="width: 150px"></el-input>-->
<!--            </el-form-item>-->
<!--          </div>-->
<!--          <div>-->
<!--            <el-form-item label="留言：">-->
<!--              <el-input v-model="toExamineProblemForm.message" style="width: 150px"></el-input>-->
<!--            </el-form-item>-->
<!--          </div>-->
<!--          <div>-->
<!--            <el-form-item label="完成标记：">-->
<!--              <el-input v-model="toExamineProblemForm.completion_mark" style="width: 150px"></el-input>-->
<!--            </el-form-item>-->
<!--            <el-form-item label="激励说明：">-->
<!--              <el-input v-model="toExamineProblemForm.incentive_explanation" style="width: 150px"></el-input>-->
<!--            </el-form-item>-->
<!--          </div>-->
        </el-form>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="problemDialog = false">{{main.cancel}}</el-button>
        <el-button type="primary" @click="auditProblemEditOk">{{main.ok}}</el-button>
      </span>
    </el-dialog>
    <!--查看审核照片的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="problemPictureDialog"
        width="80%">
      <el-upload
          action="http://10.255.96.48:3499/russiaEngine/"
          list-type="picture-card"
          :auto-upload="false"
          :on-change="(file, fileList1) => saveFileAnnex(file, fileList1)"
          :file-list="pictureFileList">
        <i slot="default" class="el-icon-plus"></i>
        <div slot="file" slot-scope="{file}">
          <div class="custom-file-card">
            <img
                class="el-upload-list__item-thumbnail"
                :src="file.url" alt=""
            >
            <div class="file-name">{{ file.name }}</div> <!-- 显示文件名 -->
            <span class="el-upload-list__item-actions">
          <span
              class="el-upload-list__item-preview"
              @click="handlePictureCardPreview(file)"
          >
            <i class="el-icon-zoom-in"></i>
          </span>
          <span
              v-if="!disabled"
              class="el-upload-list__item-delete"
              @click="handleDownload(file)"
          >
            <i class="el-icon-download"></i>
          </span>
          <span
              v-if="!disabled"
              class="el-upload-list__item-delete"
              @click="handleRemovePicture(file)"
          >
            <i class="el-icon-delete"></i>
          </span>
        </span>
          </div>
        </div>
      </el-upload>
    </el-dialog>

    <!--编辑审核问题原因的弹窗-->
    <el-dialog
        :title="titleUse"
        v-if="editReasonDialog"
        :visible.sync="editReasonDialog"
        width="680px"
        :before-close="handleClose">
      <div style="margin-top: 10px;text-align: left">
        <span style="font-size: 18px">原因分析：</span>
        <rich-text-translate
            :language-s="languageS"
            :rich-text-translate-data="causeAnalysis"
            @content-change="causeAnalysisTranslate">
        </rich-text-translate>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="editReasonDialog = false">{{main.cancel}}</el-button>
        <el-button type="primary" @click="saveMeasureEdit">{{main.ok}}</el-button>
      </span>
    </el-dialog>
    <!--编辑审核问题纠正措施的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="editCorrectiveActionDialog"
        width="680px"
        :before-close="handleClose">
      <div style="margin-top: 10px;text-align: left">
        <span style="font-size: 18px">{{pageVal.problemManagement.corrective_action}}</span>
        <rich-text-translate
            :language-s="languageS"
            :rich-text-translate-data="correctiveAction"
            @content-change="correctiveActionTranslate">
        </rich-text-translate>
      </div>
      <div style="margin-top: 10px;text-align:center">
        <span style="font-size: 18px">{{pageVal.problemManagement.responsible_person}}</span>
        <el-input
            v-model="toExamineProblemForm.correction_responsible_person"
            style="width: 30%;margin-top: 8px;margin-right: 35px">
        </el-input>
        <span style="font-size: 18px">{{pageVal.problemManagement.completion_time}}</span>
        <el-date-picker
            v-model="toExamineProblemForm.correction_completion_time"
            type="date"
            :placeholder="main.selectDate"
            value-format="yyyy-MM-dd"
            style="width: 150px">
        </el-date-picker>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="editCorrectiveActionDialog = false">{{main.cancel}}</el-button>
        <el-button type="primary" @click="saveMeasureEdit">{{main.ok}}</el-button>
      </span>
    </el-dialog>
    <!--编辑审核问题预防措施的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="editPreventiveActionDialog"
        width="680px"
        :before-close="handleClose">
      <div style="margin-top: 10px;text-align: left">
        <span style="font-size: 18px">{{pageVal.problemManagement.prevention_action}}</span>
        <rich-text-translate
            :language-s="languageS"
            :rich-text-translate-data="preventiveAction"
            @content-change="preventiveActionTranslate">
        </rich-text-translate>
      </div>
      <div style="margin-top: 10px;text-align:center">
        <span style="font-size: 18px">{{pageVal.problemManagement.responsible_person}}</span>
        <el-input
            v-model="toExamineProblemForm.prevention_responsible_person"
            style="width: 30%;margin-top: 8px;margin-right: 35px">
        </el-input>
        <span style="font-size: 18px">{{pageVal.problemManagement.completion_time}}</span>
        <el-date-picker
            v-model="toExamineProblemForm.prevention_completion_time"
            type="date"
            :placeholder="main.selectDate"
            value-format="yyyy-MM-dd"
            style="width: 150px">
        </el-date-picker>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="editPreventiveActionDialog = false">{{main.cancel}}</el-button>
        <el-button type="primary" @click="saveMeasureEdit">{{main.ok}}</el-button>
      </span>
    </el-dialog>
    <!--编辑审核问题效果确认的弹窗-->
    <el-dialog
        :title="titleUse"
        :visible.sync="editEffectConfirmationDialog"
        width="500px"
        :before-close="handleClose">
      <div>
        <el-form :inline="true" :model="toExamineProblemForm" label-width="100px">
          <el-form-item :label="pageVal.problemManagement.effect_confirmation" required>
            <el-select v-model="toExamineProblemForm.effect_confirmation" filterable :placeholder="main.select" style="width: 280px">
              <el-option
                  v-for="item in effectConfirmationOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="pageVal.problemManagement.notes">
            <el-input v-model="notes" style="width: 280px" type="textarea" autosize></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.problemManagement.confirmer" required>
            <el-input v-model="toExamineProblemForm.confirmer" style="width: 280px"></el-input>
          </el-form-item>
          <el-form-item :label="pageVal.problemManagement.confirmation_time" required>
            <el-date-picker
                v-model="toExamineProblemForm.confirmation_time"
                type="date"
                :placeholder="main.selectDate"
                value-format="yyyy-MM-dd"
                style="width: 280px">
            </el-date-picker>
          </el-form-item>
          <el-form-item :label="pageVal.problemManagement.problem_close" required>
            <el-select v-model="toExamineProblemForm.problem_close" filterable :placeholder="main.select" style="width: 280px">
              <el-option
                  v-for="item in problemCloseOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </el-form>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="editEffectConfirmationDialog = false">{{main.cancel}}</el-button>
        <el-button type="primary" @click="saveMeasureEdit">{{main.ok}}</el-button>
      </span>
    </el-dialog>

    <!--抽屉放置区域-->
    <el-drawer
        :visible.sync="problemManagementDrawer"
        direction="ttb"
        :before-close="handleClose"
        :with-header="false"
        size="75%"
        style="overflow: scroll">
      <table style="width: 99%; border-collapse: collapse; border: 1px solid blue;margin-top: 30px;margin-left: 10px">
        <tr>
          <th style="border: 1px solid blue; padding: 8px;">{{pageVal.problemManagement.problem_description}}</th>
          <th style="border: 1px solid blue; padding: 8px;">
            <el-link style="color: red; font-size: 16px" @click="editMeasure(1)">{{pageVal.problemManagement.reason}}</el-link></th>
          <th style="border: 1px solid blue; padding: 8px;" colspan="2">{{pageVal.problemManagement.correct}}</th>
          <th style="border: 1px solid blue; padding: 8px; width: 100px">{{pageVal.problemManagement.responsible_person}}</th>
          <th style="border: 1px solid blue; padding: 8px; width: 120px">{{pageVal.problemManagement.completion_time}}</th>
        </tr>
        <tr>
          <td rowspan="2" style="border: 1px solid blue; padding: 8px; width: 220px;text-align: left">
            <span v-if="languageS==='chinese'" v-html="toExamineProblemForm.problem_description ? toExamineProblemForm.problem_description.split('|*|')[0] : ''"></span>
            <span v-else-if="languageS==='english'" v-html="toExamineProblemForm.problem_description ? toExamineProblemForm.problem_description.split('|*|')[1] : ''"></span>
            <span v-else-if="languageS==='russian'" v-html="toExamineProblemForm.problem_description ? toExamineProblemForm.problem_description.split('|*|')[2] : ''"></span>
          </td> <!-- 问题描述跨2行 -->
          <td rowspan="2" style="border: 1px solid blue; padding: 8px;">
            <span v-if="languageS==='chinese'" v-html="toExamineProblemForm.reason.split('|*|')[0]"></span>
            <span v-else-if="languageS==='english'" v-html="toExamineProblemForm.reason.split('|*|')[1]"></span>
            <span v-else-if="languageS==='russian'" v-html="toExamineProblemForm.reason.split('|*|')[2]"></span>
            <span v-else>{{toExamineProblemForm.reason}}</span>
          </td> <!-- 原因分析跨2行 -->
          <td style="border: 1px solid blue; padding: 8px;width: 80px"><el-link style="color: red; font-size: 16px" @click="editMeasure(2)">{{pageVal.problemManagement.corrective_action}}</el-link></td>
          <td style="border: 1px solid blue; padding: 8px;width: 300px">
            <span v-if="languageS==='chinese'" v-html="toExamineProblemForm.corrective_action.split('|*|')[0]"></span>
            <span v-else-if="languageS==='english'" v-html="toExamineProblemForm.corrective_action.split('|*|')[1]"></span>
            <span v-else-if="languageS==='russian'" v-html="toExamineProblemForm.corrective_action.split('|*|')[2]"></span>
            <span v-else>{{toExamineProblemForm.corrective_action}}</span>
          </td><!-- 整改对策第一行 -->
          <td style="border: 1px solid blue; padding: 8px;">{{toExamineProblemForm.correction_responsible_person}}</td> <!-- 负责人第一行 -->
          <td style="border: 1px solid blue; padding: 8px;">{{toExamineProblemForm.correction_completion_time}}</td> <!-- 完成时间第一行 -->
        </tr>
        <tr>
          <td style="border: 1px solid blue; padding: 8px;"><el-link style="color: red; font-size: 16px" @click="editMeasure(3)">{{pageVal.problemManagement.prevention_action}}</el-link></td> <!-- 整改对策第二行 -->
          <td style="border: 1px solid blue; padding: 8px;">
            <span v-if="languageS==='chinese'" v-html="toExamineProblemForm.preventive_action.split('|*|')[0]"></span>
            <span v-else-if="languageS==='english'" v-html="toExamineProblemForm.preventive_action.split('|*|')[1]"></span>
            <span v-else-if="languageS==='russian'" v-html="toExamineProblemForm.preventive_action.split('|*|')[2]"></span>
            <span v-else>{{toExamineProblemForm.preventive_action}}</span>
          </td>
          <td style="border: 1px solid blue; padding: 8px;">{{toExamineProblemForm.prevention_responsible_person}}</td><!-- 负责人第二行 -->
          <td style="border: 1px solid blue; padding: 8px;">{{toExamineProblemForm.prevention_completion_time}}</td> <!-- 完成时间第二行 -->
        </tr>
      </table>
      <table style="width: 99%; border-collapse: collapse; border: 1px solid blue;margin-top: 30px;margin-left: 10px">
        <tr>
          <th style="border: 1px solid blue; padding: 8px;" colspan="8"><el-link style="color: red; font-size: 16px" @click="editMeasure(4)">{{pageVal.problemManagement.effectEvaluation}}</el-link></th>
        </tr>
        <tr>
          <td style="border: 1px solid blue; padding: 8px; width: 12.5%; font-weight: bold;">{{pageVal.problemManagement.effect_confirmation}}</td>
          <td style="border: 1px solid blue; padding: 8px; width: 12.5%;">{{toExamineProblemForm.effect_confirmation}}</td>
          <td style="border: 1px solid blue; padding: 8px; width: 12.5%; font-weight: bold;">{{pageVal.problemManagement.confirmer}}</td>
          <td style="border: 1px solid blue; padding: 8px; width: 12.5%;">{{toExamineProblemForm.confirmer}}</td>
          <td style="border: 1px solid blue; padding: 8px; width: 12.5%; font-weight: bold;">{{pageVal.problemManagement.confirmation_time}}</td>
          <td style="border: 1px solid blue; padding: 8px; width: 12.5%;">{{toExamineProblemForm.confirmation_time}}</td>
          <td style="border: 1px solid blue; padding: 8px; width: 12.5%; font-weight: bold;">{{pageVal.problemManagement.problem_close}}</td>
          <td style="border: 1px solid blue; padding: 8px; width: 12.5%;">{{toExamineProblemForm.problem_close}}</td>
        </tr>
      </table>
    </el-drawer>
  </div>
</template>

<script>/*Vue组件逻辑部分，数据绑定、存储、控制、生命周期、定义方法及功能*/

import {filepath, systemOptions} from "@/configUse";
import _ from "lodash";
import E from "wangeditor";
import * as echarts from "echarts";
import {translate_zh_en_ru} from "@/components/utils/useUtils";
import RichTextTranslate from "@/components/utils/richTextTranslate.vue";
import TextTranslate from "@/components/utils/textTranslate.vue";

export default {
  name: "toExamineProblem",
  components: {TextTranslate, RichTextTranslate},
  computed: {
    workshopFilters() {
      if (this.languageS === 'chinese') {
        return [
          {text: '装配车间', value: '装配车间'},
          {text: '机加车间', value: '机加车间'}
        ];
      } else if (this.languageS === 'english') {
        return [
          {text: 'Assembly workshop', value: 'Assembly workshop'},
          {text: 'Machining workshop', value: 'Machining workshop'}
        ];
      } else {
        return [
          {text: 'Сборочная Цех', value: 'Сборочная Цех'},
          {text: 'Обработки Цех', value: 'Обработки Цех'}
        ];
      }
    },
    lineFilters() {
      if (this.languageS === 'chinese') {
        return [
          {text: '总成线', value: '总成线'},
          {text: '缸盖分装线', value: '缸盖分装线'},
          {text: '热试线', value: '热试线'}
        ];
      } else if (this.languageS === 'english') {
        return [
          {text: 'Assembly line', value: 'Assembly line'},
          {text: 'Cylinder head assembly line', value: 'Cylinder head assembly line'},
          {text: 'Hot test line', value: 'Hot test line'}
        ];
      } else {
        return [
          {text: 'сборочная линия', value: 'сборочная линия'},
          {text: 'сборочная линия головки блока цилиндров', value: 'сборочная линия головки блока цилиндров'},
          {text: 'Тепловая линия', value: 'Тепловая линия'}
        ];
      }
    },
    //禁用新增文档的确认提交按钮
    isFormValid() {
      return this.pdfDocumentForm.number &&
          this.pdfDocumentForm.name &&
          this.pdfDocumentForm.name_english &&
          this.pdfDocumentForm.name_russian &&
          this.currentFile;
    },
    //禁用编辑文档的确认提交按钮
    isEditFormValid() {
      return this.editPdfDocumentForm.number &&
          this.editPdfDocumentForm.name &&
          this.editPdfDocumentForm.name_english &&
          this.editPdfDocumentForm.name_russian;
    },

    //禁用新增表单的确认提交按钮
    isFormValidForm() {
      return this.formDocumentForm.number &&
          this.formDocumentForm.name &&
          this.formDocumentForm.name_english &&
          this.formDocumentForm.name_russian &&
          this.currentFileForm;
    },
    //禁用编辑表单的确认提交按钮
    isEditFormValidForm() {
      return this.editFormDocumentForm.number &&
          this.editFormDocumentForm.name &&
          this.editFormDocumentForm.name_english &&
          this.editFormDocumentForm.name_russian;
    },
  },
  data() {
    return {
      //控制翻译部分的忙加载的变量
      problem_description_loading:false,
      //控制tab的变量，主要用在了翻译部分
      problem_description_tab:'chinese',
      //问题描述的变量，中文；
      inputTextChinese:'',
      //问题描述的变量，英文；
      inputTextEnglish:'',
      //问题描述的变量，俄文；
      inputTextRussian:'',
      //控制pdf文档表格pdfDocument高度的变量
      pdfDocumentHeight:window.visualViewport.height-225,
      //控制体系文件表格systemDocument高度的变量
      systemDocumentHeight:window.visualViewport.height-225,
      //控制标准作业监察表格高度的变量
      standardWorkSuperviseHeight:window.visualViewport.height-240,
      //控制审核问题管理表格高度的变量
      auditProblemHeight:window.visualViewport.height-265,

      //用户权限相关的变量
      useName: '',//用户名称
      useId: '',//用户编号
      usePower: '',//用户权限
      //用户现在的是哪个按钮：1.查阅文件；2.品质监查
      buttonDoe:-1,
      //切换按钮的颜色
      buttonBackColor1:'',//按钮的背景颜色
      buttonColor1:'',//按钮的字体颜色
      buttonBackColor2:'',//按钮的背景颜色
      buttonColor2:'',//按钮的字体颜色
      //品质评价
      buttonBackColor3:'',//按钮的背景颜色
      buttonColor3:'',//按钮的字体颜色

      //点击按钮后默认显示哪个tab
      activeNameDocument:'pdfDocument',
      activeName: 'first',

      //忙加载变量
      loading:false,

      //—————————————————————————————————————弹窗变量————————————————————————————————————————
      //弹窗的提示
      titleUse: '提示',

      //上传文档的弹窗
      uploadDocumentDialog:false,
      //上传体系文档的弹窗
      uploadDocxDocumentDialog:false,
      //查看pdf的弹窗
      pdfShowDialog: false,
      //编辑pdf文档的弹窗
      editDocumentDialog: false,
      //上传表单的弹窗
      uploadFormDialog:false,
      //查看表单的弹窗
      formShowDialog: false,
      //编辑表单的弹窗
      editFormDialog: false,
      //编辑问题的弹窗
      problemDialog: false,
      //删除问题的弹窗
      deleteDialog: false,
      //查看审核问题照片的弹窗
      problemPictureDialog:false,
      //控制标准作业监察项目是否新增的弹窗
      standardWorkSuperviseDialog: false,
      //新增或编辑审核块的弹窗
      standardModuleDialog: false,
      //编辑审核块指导书的弹窗
      instructionDialog: false,
      //编辑指导书内容的弹窗
      stepEditDialog:false,
      //上传照片的弹窗
      dialogPicture:false,
      //上传图片的弹窗提示
      dialogPictureAnnex:false,
      //上传图片的弹窗打开后，点击放大管控弹窗提示
      enlargeImageDialog:false,
      //上传视频的弹窗提示
      dialogVideo:false,
      //编辑审核问题原因分析的弹窗
      editReasonDialog:false,
      //编辑审核问题纠正措施的弹窗
      editCorrectiveActionDialog:false,
      //编辑审核问题预防措施的弹窗
      editPreventiveActionDialog:false,
      //编辑审核问题效果确认的弹窗
      editEffectConfirmationDialog:false,

      //控制审核问题的抽屉
      problemManagementDrawer:false,

      //—————————————————————————————————————语言切换变量————————————————————————————————————————
      //用户登录后默认为中文
      languageS: 'chinese',
      //切换语言，页面变量
      main: {
        qualityManagementSystem:'俄动力质量管理系统 ',
        systemManagementSystem:'体系管理系统',
        description:'请先选择左侧导航以查看内容',
        viewDocument:'查阅文件',
        systemCheck:'体系审核',
        cancel:'取 消',
        ok:'确 定',
        select:'请选择',
        selectDate:'选择日期',
        chinese:'中文',
        english:'英文',
        russian:'俄文',
        sureToDelete:'确定删除吗？'
      },
      pageVal:{
        pdfDocument:{
          pdfDocument:'PDF文档',
          uploadDocument:'上传文档',
          clickToUpload:'点击上传文档',
          onlyPdf:'只能上传PDF文件',
          confirmToUpload:'确认上传',
          consultDocument:'查阅文档：请输入文件名称或编号',
          order:'序号',
          number:'文件编号',
          name:'文件名称',
          name_english:'文件名称_英',
          name_russian:'文件名称_俄',
          version_number:'版本号',
          upload_person:'上传人',
          upload_time:'上传日期',
          revise_time:'修改日期',
          operate:'操作',
          pdfView:'PDF预览',
        },
        systemDocument:{
          systemDocument: '体系文件'
        },
        downloadForm:{
          downloadForm: '下载表单',
          number:'表单编号',
          name:'表单名称',
          name_english:'表单名称_英',
          name_russian:'表单名称_俄',
        },
        standardWork:{
          standardWork: '体系审核标准',
          add:'添加',
          filter:'重置筛选',
          workshop: '车间名称',
          line: '线体',
          op:'工序',
          project: '审核项目',
          requirement: '审核要求',
          edit: '编辑',
        },
        standardModule:{
          standardModule: '标准块',
          standard_module_name:'标准块名称',
          standard_module_name_english:'标准块名称_英',
          standard_module_name_russian:'标准块名称_俄',
          audit_link:'审核环节',
          audit_project:'审核项目',
          audit_project_english:'审核项目_英',
          audit_project_russian:'审核项目_俄',
          audit_requirement:'审核要求',
          audit_requirement_english:'审核要求_英',
          audit_requirement_russian:'审核要求_俄',
          step:'步骤',
          audit_instruction:'审核指导书',
          problem_level:'问题等级',
          time:'用时',
          section:'责任科室',
          related_document1:'关联文件1',
          related_document2:'关联文件2',
          related_document3:'关联文件3',
          iFTA_clause:'IFTA条款',
          system_document_association:'公司体系文件关联',

          instruction:'要领书/指导书',
          manHour:'工时',
          picture:'图片',
          video:'视频',
          stepContent:'步骤内容',
          attentionPoint:'注意点',
          workTime:'工步用时(单位min)',
        },
        problemManagement:{
          problemManagement: '审核问题管理',
          audit_source:'审核来源',
          audit_date:'审核日期',
          auditor:'问题审核人',
          process:'过程',
          problem_type:'问题类型',
          problem_classification:'问题分类',
          file_name:'文件名称',
          clause_number:'条款编号',
          problem_photo:'问题照片',
          problem_description:'问题描述',
          reason:'原因分析',
          correct:'整改措施',
          corrective_action:'纠正措施',
          prevention_action:'预防措施',
          completion_time:'完成时间',
          evidence_upload:'证据上传',
          department:'责任部门',
          measure_maker:'措施制定人',
          responsible_person:'责任人',
          audit_person:'审核人',
          approver:'批准人',
          message:'留言',
          completion_mark:'完成标记',
          incentive_explanation:'激励说明',
          effectEvaluation:'效果评价',
          effect_confirmation:'效果确认',
          notes:'备注',
          confirmer:'确认人',
          confirmation_time:'确认时间',
          problem_close:'问题关闭',
          order:'序号',
          operate:'操作',
        },
      },

      //—————————————————————————————————————删除的变量————————————————————————————————————————
      //记录要在哪个表中删除
      deleteTableName: '',

      //—————————————————————————————————————PDF文档————————————————————————————————————————
      //pdf文档信息
      pdfDocumentData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:this.useName,
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //文件编号
          number:'',
          //文件名称
          name:'',
          //文件名称_英
          name_english:'',
          //文件名称_俄
          name_russian:'',
          //版本号
          version_number:'',
          //上传人
          upload_person:'',
          //上传时间
          upload_time:'',
          //修改时间
          revise_time:'',
          //文件路径
          document_path:'',
        }
      ],
      //pdf文档表
      pdfDocumentForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:this.useName,
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:'',
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:'',

        //文件编号
        number:'',
        //文件名称
        name:'',
        //文件名称_英
        name_english:'',
        //文件名称_俄
        name_russian:'',
        //版本号
        version_number:'',
        //上传人
        upload_person:'',
        //上传时间
        upload_time:'',
        //修改时间
        revise_time:'',
        //文件路径
        document_path:''
      },
      //记录用户当前点击了哪一行
      pdfDocumentScope:null,
      //暂存当前编辑的行
      currentEditScope: null,
      //独立的搜索字段，存储搜索框内的内容
      searchQuery: '',
      //记录上传的PDF文件的文件列表
      fileList:[],
      //当前文件
      currentFile: null,
      //存储过滤后的数据（用于表格显示）
      originalPdfDocumentData: [], // 用于保存原始数据
      //上传文件弹窗校验规则
      pdfDocumentRules: {
        number: [{ required: true, message: '请输入文档编号', trigger: 'blur' }],
        name: [{ required: true, message: '请输入文档名称', trigger: 'blur' }],
        name_english: [{ required: true, message: '请输入英文名称', trigger: 'blur' }],
        name_russian: [{ required: true, message: '请输入俄文名称', trigger: 'blur' }]
      },
      //文件保存路径
      pdfUrl: '',
      //编辑pdf文档的相关变量
      editPdfDocumentForm: {
        id: '',
        number: '',
        name: '',
        name_english: '',
        name_russian: '',
        version_number: '',
        document_path: ''
      },
      editFileList: [],
      editCurrentFile: null,
      currentEditRow: null,

      //—————————————————————————————————————下载表单————————————————————————————————————————
      //表单信息
      formDocumentData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:this.useName,
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //表单编号
          number:'',
          //表单名称
          name:'',
          //表单名称_英
          name_english:'',
          //表单名称_俄
          name_russian:'',
          //版本号
          version_number:'',
          //上传人
          upload_person:'',
          //上传时间
          upload_time:'',
          //修改时间
          revise_time:'',
          //表单路径
          document_path:'',
        }
      ],
      //表单表
      formDocumentForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:this.useName,
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:'',
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:'',

        //表单编号
        number:'',
        //表单名称
        name:'',
        //表单名称_英
        name_english:'',
        //表单名称_俄
        name_russian:'',
        //版本号
        version_number:'',
        //上传人
        upload_person:'',
        //上传时间
        upload_time:'',
        //修改时间
        revise_time:'',
        //表单路径
        document_path:''
      },
      //记录用户当前点击了哪一行
      formDocumentScope:null,
      //暂存当前编辑的行
      currentEditScopeForm: null,
      //独立的搜索字段，存储搜索框内的内容
      searchQueryForm: '',
      //记录上传的表单文件的文件列表
      fileListForm:[],
      //当前文件
      currentFileForm: null,
      //存储过滤后的数据（用于表格显示）
      originalFormDocumentData: [], // 用于保存原始数据
      //上传文件弹窗校验规则
      formDocumentRules: {
        number: [{ required: true, message: '请输入文档编号', trigger: 'blur' }],
        name: [{ required: true, message: '请输入文档名称', trigger: 'blur' }],
        name_english: [{ required: true, message: '请输入英文名称', trigger: 'blur' }],
        name_russian: [{ required: true, message: '请输入俄文名称', trigger: 'blur' }]
      },
      //表单文件保存路径
      formUrl: '',
      //编辑表单文档的相关变量
      editFormDocumentForm: {
        id: '',
        number: '',
        name: '',
        name_english: '',
        name_russian: '',
        version_number: '',
        document_path: ''
      },
      editFileListForm: [],
      editCurrentFileForm: null,
      currentEditRowForm: null,
      //预览的变量
      previewType: '',

      //—————————————————————————————————————体系文件————————————————————————————————————————
      //体系文件信息
      systemDocumentData:[
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //文件编号
          number:'',
          //文件名称
          name:'',
          //文件名称_英
          name_english:'',
          //文件名称_俄
          name_russian:'',
          //版本号
          versionNumber:'',
          //上传人
          uploadPerson:'',
          //上传日期
          uploadTime:'',
          //修改日期
          editTime:'',
        }
      ],
      //体系文件表
      systemDocumentForm:{
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:'',
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:'',
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:'',

        //文件编号
        number:'',
        //文件名称
        name:'',
        //文件名称_英
        name_english:'',
        //文件名称_俄
        name_russian:'',
        //版本号
        versionNumber:'',
        //上传人
        uploadPerson:'',
        //上传日期
        uploadTime:'',
        //修改日期
        editTime:'',

      },
      //记录用户当前点击了哪一行
      systemDocumentScope:null,

      //记录上传的DOCX文件的文件列表
      fileListDocx:[],
      //当前文件
      currentFileDocx: null,

      //—————————————————————————————————————体系审核标准————————————————————————————————————————
      //标准作业监察项目表(大表)
      standardWorkSuperviseData: [
        {
          //主键
          id: '',
          //创建时间
          create_time: '',
          //更新时间
          update_time: '',
          //创建人
          creator: '',
          //流程状态
          process_status: '',
          //更新人
          sys_update_user: '',
          //审核人
          sys_audit_user: '',
          //审核时间
          sys_audit_time: '',
          //逻辑删除
          sys_deleted: '',
          //审核项目
          project: '',
          //审核要求
          require: '',
          //被审核工序
          op: '',
          //车间名称
          workshop: '',
          //线体名称
          line: '',
          //自有编辑人
          editor: '',
          //自有创建时间
          establishTime: '',
          //自有更新时间
          updateTime: '',
          //审核项目_英语
          project_english: '',
          //审核项目_俄语
          project_russian: '',
          //审核要求_英语
          require_english: '',
          //审核要求_俄语
          require_russian: '',
          //
        }
      ],
      //添加项目的时候，弹窗内容清空，将值赋空
      standardWorkSuperviseForm: {
        //主键
        id: '',
        //创建时间
        create_time: '',
        //更新时间
        update_time: '',
        //创建人
        creator: '',
        //流程状态
        process_status: '',
        //更新人
        sys_update_user: '',
        //审核人
        sys_audit_user: '',
        //审核时间
        sys_audit_time: '',
        //逻辑删除
        sys_deleted: '',
        //审核项目
        project: '',
        //审核要求
        require: '',
        //被审核工序
        op: '',
        //车间名称
        workshop: '',
        //线体名称
        line: '',
        //自有编辑人
        editor: '',
        //自有创建时间
        establishTime: '',
        //自有更新时间
        updateTime: '',
        //审核项目_英语
        project_english: '',
        //审核项目_俄语
        project_russian: '',
        //审核要求_英语
        require_english: '',
        //审核要求_俄语
        require_russian: '',

      },
      //给该值赋予一个状态，为“0”时，调用的公式按照此状态实施判断
      standardWorkSuperviseDoe: 0,
      //记录用户当前点击了哪一行
      standardWorkSuperviseScope: null,

      //—————————————————————————————————————————标准块——————————————————————————————————————————
      standardModuleData:[
        {
          //主键
          id: '',
          //创建时间
          create_time: '',
          //更新时间
          update_time: '',
          //创建人
          creator: '',
          //流程状态
          process_status: '',
          //更新人
          sys_update_user: '',
          //审核人
          sys_audit_user: '',
          //审核时间
          sys_audit_time: '',
          //逻辑删除
          sys_deleted: '',

          //标准块名称
          standard_module_name: '',
          //审核环节
          audit_link: '',
          //审核项目
          audit_project: '',
          //审核要求
          audit_requirement: '',
          //审核指导书
          audit_instruction: '',
          //问题等级
          problem_level: '',
          //用时
          time: '',
          //责任科室
          section: '',
          //关联文件1
          related_document1: '',
          //关联文件2
          related_document2: '',
          //关联文件3
          related_document3: '',
          //IFTA条款
          iFTA_clause: '',
          //公司体系文件关联
          system_document_association: ''
      }],
      standardModuleForm:{
        //主键
        id: '',
        //创建时间
        create_time: '',
        //更新时间
        update_time: '',
        //创建人
        creator: '',
        //流程状态
        process_status: '',
        //更新人
        sys_update_user: '',
        //审核人
        sys_audit_user: '',
        //审核时间
        sys_audit_time: '',
        //逻辑删除
        sys_deleted: '',
        //标准块名称
        standard_module_name: '',
        //审核环节
        audit_link: '',
        //审核项目
        audit_project: '',
        //审核要求
        audit_requirement: '',
        //审核指导书
        audit_instruction: '',
        //问题等级
        problem_level: '',
        //用时
        time: '',
        //责任科室
        section: '',
        //关联文件1
        related_document1: '',
        //关联文件2
        related_document2: '',
        //关联文件3
        related_document3: '',
        //IFTA条款
        iFTA_clause: '',
        //公司体系文件关联
        system_document_association: ''
      },
      standardModuleScope: null,
      standardModuleDoe: 0,

      standard_module_name_chinese:'',
      standard_module_name_english:'',
      standard_module_name_russian:'',
      audit_project_chinese:'',
      audit_project_english:'',
      audit_project_russian:'',
      audit_requirement_chinese:'',
      audit_requirement_english:'',
      audit_requirement_russian:'',

      //审核块分页相关变量
      standardModulePagination: {
        currentPage: 1,
        pageSize: 20, // 每页显示条数
        total: 0,
      },

      //用作指导书表头部分的选择
      workBookHeard1:'#0269fa',
      workBookHeard2:'',
      workBookHeard3:'',
      workBookHeardColour1:'white',
      workBookHeardColour2:'',
      workBookHeardColour3:'',
      videoAndImage1:'',//图片的背景色
      videoAndImage2:'',//视频的背景色
      videoAndImageColor1:'',//图片的字体颜色
      videoAndImageColor2:'',//视频的字体颜色

      //图片相关的数据，录像相关的项目
      itemView:[],//展示图片的路径，用在了走马灯部位
      itemViewVideo:[],//展示视频，用在了走马灯部位
      editPictureType:0,//修改图片的类型，主要记录
      PictureList:[],//图片文件的
      videoList:[],//录像的文件列表
      videoUrl:filepath+'',//视频的地址
      fileType:'',//限定上传文件的类型

      //作业指导书的内容
      workBook:[
        {
          id:0,
          work:'请编辑',//工作步骤
          problem:'请输入',//关注点
          spendTime:0,//需要时间
          pictureList:'',//图片列表
          videoList:'',//视频列表
          reserve1:'',
          reserve2:'',
          reserve3:'',
        }],
      workBookForm: {
          id:0,
          work:'请编辑',//工作步骤
          problem:'请输入',//关注点
          spendTime:0,//需要时间
          pictureList:'',//图片列表
          videoList:'',//视频列表
          reserve1:'',
          reserve2:'',
          reserve3:'',
        },
      workBookScope:null,
      workBookDoe:0,
      //文本框弹窗中，绑定的三个输入框的内容
      inputText1:'',//步骤中
      inputText2:'',//步骤英
      inputText3:'',//步骤俄
      inputNum:0,//工步用时
      //富文本的变量
      //注意点说明：
      pointsChineseEditor: null,
      pointsEnglishEditor: null,
      pointsRussianEditor: null,
      // 当前激活的tab
      pointsActiveTab: 'chinese',

      //记录用户点击的哪一行的内容，用作改变背景颜色
      workBookRow:null,
      //用户要看作业指导书的哪一部分
      workBookHeardUse:1,
      //控制显示图片还是显示视频播放器的控件变量
      switchVideoUse:1,
      //放大图片/视频的变量
      isImageFile:0,

      //画工时直方图
      chartUserBor:null,
      optionBor: {
        title: {
          text: '无信息',        // 主标题文本
          subtext:'',              //副标题
          left: 'center',         // 标题位置（left/center/right/数值）
          top: 'top',             // 标题垂直位置（top/center/bottom/数值）
          textStyle: {
            color: '#333',        // 标题颜色
            fontSize: 18,         // 标题字号
            fontWeight: 'bold'    // 字体粗细
          },
          subtextStyle: {
            color: '#aaa'         // 副标题样式
          }
        },
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'shadow'
          }
        },
        grid: {
          top:'18%',
          left: '3%',
          right: '4%',
          bottom: '10%',
          containLabel: true
        },
        xAxis: [
          {
            type: 'category',
            data: [],
            axisTick: {
              alignWithLabel: true
            }
          }
        ],
        yAxis: [
          {
            type: 'value'
          }
        ],
        series: [
          {
            name: 'Direct',
            type: 'bar',
            barWidth: '60%',
            data:[]
          }
        ]
      },

      //—————————————————————————————————————审核问题管理————————————————————————————————————————
      //审核问题的大表
      toExamineProblemData: [
        {
          //唯一标识，低代码的主键
          id:'',
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:'',
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:'',

          //审核来源
          audit_source:'',
          //审核日期
          audit_date:'',
          //问题审核人
          auditor:'',
          //过程
          process:'',
          //问题类型
          problem_type:'',
          //问题分类
          problem_classification:'',
          //文件名称
          file_name:'',
          //条款编号
          clause_number:'',
          //问题照片
          problem_photo:'',
          //问题描述
          problem_description:'',
          //原因
          reason:'',
          //纠正措施
          corrective_action:'',
          //预防措施
          preventive_action:'',
          //纠正完成时间
          correction_completion_time:'',
          //预防完成时间
          prevention_completion_time:'',
          //证据上传
          evidence_upload:'',
          //责任部门
          department:'',
          //措施制定人
          measure_maker:'',
          //纠正措施责任人
          correction_responsible_person:'',
          //预防措施责任人
          prevention_responsible_person:'',
          //审批人
          audit_person:'',
          //批准人
          approver:'',
          //留言
          message:'',
          //完成标记
          completion_mark:'',
          //激励说明
          incentive_explanation:'',
          //效果确认
          effect_confirmation:'',
          //确认人
          confirmer:'',
          //确认时间
          confirmation_time:'',
          //问题关闭
          problem_close:'',
        }
      ],
      //审核问题的表单编辑变量
      toExamineProblemForm: {
        //唯一标识，低代码的主键
        id:'',
        //创建时间
        create_time:'',
        //更新时间
        update_time:'',
        //创建人
        creator:'',
        //流程状态
        process_status:'',
        //更新人
        sys_update_user:'',
        //审核人
        sys_audit_user:'',
        //审核时间
        sys_audit_time:'',
        //逻辑删除
        sys_deleted:'',

        //审核来源
        audit_source:'',
        //审核日期
        audit_date:'',
        //问题审核人
        auditor:'',
        //过程
        process:'',
        //问题类型
        problem_type:'',
        //问题分类
        problem_classification:'',
        //文件名称
        file_name:'',
        //条款编号
        clause_number:'',
        //问题照片
        problem_photo:'',
        //问题描述
        problem_description:'',
        //原因
        reason:'',
        //纠正措施
        corrective_action:'',
        //预防措施
        preventive_action:'',
        //纠正完成时间
        correction_completion_time:'',
        //预防完成时间
        prevention_completion_time:'',
        //证据上传
        evidence_upload:'',
        //责任部门
        department:'',
        //措施制定人
        measure_maker:'',
        //纠正措施责任人
        correction_responsible_person:'',
        //预防措施责任人
        prevention_responsible_person:'',
        //审批人
        audit_person:'',
        //批准人
        approver:'',
        //留言
        message:'',
        //完成标记
        completion_mark:'',
        //激励说明
        incentive_explanation:'',
        //效果确认
        effect_confirmation:'',
        //确认人
        confirmer:'',
        //确认时间
        confirmation_time:'',
        //问题关闭
        problem_close:'',
      },
      //审核问题的点击行变量Scope格式
      toExamineProblemScope: null,
      toExamineProblemDoe:0,

      //区分编辑原因分析、纠正措施、预防措施记录的值
      editMeasureDoe:0,

      //自动翻译的变量
      //自动翻译的变量
      problemDescription:{zh:'',en:'',ru:''},
      causeAnalysis:{zh:'',en:'',ru:''},
      correctiveAction:{zh:'',en:'',ru:''},
      preventiveAction:{zh:'',en:'',ru:''},

      // 审核问题分页相关变量
      auditProblemPagination: {
        currentPage: 1,
        pageSize: 20, // 每页显示条数
        total: 0,
      },

      //图片上传的变量
      dialogImageUrl: '',
      dialogVisible: false,
      disabled: false,
      pictureFile:null,
      pictureFileList:[],

      //审核问题效果确认备注的变量
      notes:'',

      //—————————————————————————————————————选择器的变量————————————————————————————————————————
      //选择车间的下拉菜单
      workShopOptions: [
        {
          value: '装配车间/Assembly workshop/Сборочная Цех',
          label: '装配车间/Assembly workshop/Сборочная Цех'
        },
        {
          value: '机加车间/Machining workshop/Обработки Цех',
          label: '机加车间/Machining workshop/Обработки Цех'
        },
      ],
      //选择线体的下拉菜单（装试车间线体）
      lineOptions: [
        {
          value: '总成线/Assembly line/сборочная линия',
          label: '总成线/Assembly line/сборочная линия'
        },
        {
          value: '缸盖分装线/Cylinder head assembly line/сборочная линия головки блока цилиндров',
          label: '缸盖分装线/Cylinder head assembly line/сборочная линия головки блока цилиндров'
        },
        {
          value: '热试线/Hot test line/Тепловая линия',
          label: '热试线/Hot test line/Тепловая линия'
        }
      ],
      //选择工序的下拉菜单（装试车间工序清单）
      opOptions: [
        {
          value: 'OP10', label: 'OP10'
        }, {
          value: 'OP20', label: 'OP20'
        }, {
          value: 'OP30', label: 'OP30'
        }, {
          value: 'OP30-1', label: 'OP30-1'
        }, {
          value: 'OP40', label: 'OP40'
        }, {
          value: 'OP50', label: 'OP50'
        }, {
          value: 'OP60', label: 'OP60'
        }, {
          value: 'OP70', label: 'OP70'
        }, {
          value: 'OP80', label: 'OP80'
        }, {
          value: 'OP90', label: 'OP90'
        }, {
          value: 'OP100', label: 'OP100'
        }, {
          value: 'OP105', label: 'OP105'
        }, {
          value: 'OP110', label: 'OP110'
        }, {
          value: 'OP120', label: 'OP120'
        }, {
          value: 'OP130', label: 'OP130'
        }, {
          value: 'OP140', label: 'OP140'
        }, {
          value: 'OP150', label: 'OP150'
        }, {
          value: 'OP155', label: 'OP155'
        }, {
          value: 'OP160', label: 'OP160'
        }, {
          value: 'OP170', label: 'OP170'
        }, {
          value: 'OP180', label: 'OP180'
        }, {
          value: 'OP190', label: 'OP190'
        }, {
          value: 'OP200', label: 'OP200'
        }, {
          value: 'OP210', label: 'OP210'
        }, {
          value: 'OP220', label: 'OP220'
        }, {
          value: 'OP230', label: 'OP230'
        }, {
          value: 'OP240', label: 'OP240'
        }, {
          value: 'OP240-1', label: 'OP240-1'
        }, {
          value: 'OP250', label: 'OP250'
        }, {
          value: 'OP260', label: 'OP260'
        }, {
          value: 'OP270', label: 'OP270'
        }, {
          value: 'OP275', label: 'OP275'
        }, {
          value: 'OP280-1', label: 'OP280-1'
        }, {
          value: 'OP280-2', label: 'OP280-2'
        }, {
          value: 'OP280-3', label: 'OP280-3'
        }, {
          value: 'OP280-4', label: 'OP280-4'
        }, {
          value: 'OP280-5', label: 'OP280-5'
        }, {
          value: 'OP290', label: 'OP290'
        }, {
          value: 'OP300', label: 'OP300'
        }, {
          value: 'OP310', label: 'OP310'
        }, {
          value: 'OP320', label: 'OP320'
        }, {
          value: 'OP330', label: 'OP330'
        }, {
          value: 'OP340', label: 'OP340'
        }, {
          value: 'OP350-1', label: 'OP350-1'
        }, {
          value: 'OP350', label: 'OP350'
        }, {
          value: 'OP360', label: 'OP360'
        }, {
          value: 'OP370', label: 'OP370'
        }, {
          value: 'OP380', label: 'OP380'
        }, {
          value: 'OP390-1', label: 'OP390-1'
        }, {
          value: 'OP390-2', label: 'OP390-2'
        }, {
          value: 'OP390', label: 'OP390'
        }, {
          value: 'OP400', label: 'OP400'
        }, {
          value: 'OP410-1', label: 'OP410-1'
        }, {
          value: 'OP410', label: 'OP410'
        }, {
          value: 'OP420', label: 'OP420'
        }, {
          value: 'OP430', label: 'OP430'
        }, {
          value: 'OP440-1', label: 'OP440-1'
        }, {
          value: 'OP440', label: 'OP440'
        }, {
          value: 'OP450', label: 'OP450'
        }, {
          value: 'OP460', label: 'OP460'
        }, {
          value: 'OP470', label: 'OP470'
        }, {
          value: 'OP480', label: 'OP480'
        }, {
          value: 'OP490', label: 'OP490'
        }, {
          value: 'OP500', label: 'OP500'
        }, {
          value: 'OP510', label: 'OP510'
        }, {
          value: 'OPHL10', label: 'OPHL10'
        }, {
          value: 'OPHL20', label: 'OPHL20'
        }, {
          value: 'OPHL30', label: 'OPHL30'
        }, {
          value: 'OPGG10', label: 'OPGG10'
        }, {
          value: 'OPGG20', label: 'OPGG20'
        }, {
          value: 'OPGG30', label: 'OPGG30'
        }, {
          value: 'OPGG40', label: 'OPGG40'
        }, {
          value: 'OPGG45', label: 'OPGG45'
        }, {
          value: 'OPGG50', label: 'OPGG50'
        },],
      //关联文件的选择器
      relatedDocumentOptions:[],
      //公司体系文件关联的选择器
      companySystemDocumentOptions:[],
      //审核来源选择器变量：
      auditSourceOptions: [
        {value:'内审/Internal Audit/Внутренний аудит', label:'内审/Internal Audit/Внутренний аудит'},
        {value:'二方审核/Second-Party Audit/Аудит второй стороны', label:'二方审核/Second-Party Audit/Аудит второй стороны'},
        {value:'三方审核/Third-Party Audit/Аудит третьей стороны', label:'三方审核/Third-Party Audit/Аудит третьей стороны'},
      ],
      //过程选择器变量：
      processOptions: [
        {value:'进货检验管理/Incoming Inspection Management/Управление входящим контролем', label:'进货检验管理/Incoming Inspection Management/Управление входящим контролем'},
        {value:'内部检验管理/Internal Inspection Management/Управление внутренним контролем', label:'内部检验管理/Internal Inspection Management/Управление внутренним контролем'},
        {value:'精密测量管理/Precision Measurement Management/Управление прецизионными измерениями', label:'精密测量管理/Precision Measurement Management/Управление прецизионными измерениями'},
        {value:'全尺寸检测/Full Dimension Inspection/Полномасштабный контроль размеров', label:'全尺寸检测/Full Dimension Inspection/Полномасштабный контроль размеров'},
        {value:'测量装置管理/Measuring Equipment Management/Управление измерительными средствами', label:'测量装置管理/Measuring Equipment Management/Управление измерительными средствами'},
        {value:'异常处置/Abnormal Handling/Устранение отклонений', label:'异常处置/Abnormal Handling/Устранение отклонений'},
        {value:'快速响应/Quick Response/Быстрое реагирование', label:'快速响应/Quick Response/Быстрое реагирование'},
        {value:'问题管理/Problem Management/Управление проблемами', label:'问题管理/Problem Management/Управление проблемами'},
        {value:'不合格品管理/Non-Conforming Product Management/Управление несоответствующей продукцией', label:'不合格品管理/Non-Conforming Product Management/Управление несоответствующей продукцией'},
        {value:'装配外购件管理/Assembled Purchased Parts Management/Управление покупными сборочными единицами', label:'装配外购件管理/Assembled Purchased Parts Management/Управление покупными сборочными единицами'},
        {value:'返工返修管理/Rework and Repair Management/Управление переделкой и ремонтом', label:'返工返修管理/Rework and Repair Management/Управление переделкой и ремонтом'},
        {value:'人员培训/Personnel Training/Обучение персонала', label:'人员培训/Personnel Training/Обучение персонала'},
        {value:'指标管理/KPI Management/Управление показателями', label:'指标管理/KPI Management/Управление показателями'},
        {value:'防错管理/Error-Proofing Management/Управление защитой от ошибок', label:'防错管理/Error-Proofing Management/Управление защитой от ошибок'},
        {value:'工装管理/Tooling Management/Управление оснасткой', label:'工装管理/Tooling Management/Управление оснасткой'},
        {value:'刀具管理/Cutting Tool Management/Управление режущим инструментом', label:'刀具管理/Cutting Tool Management/Управление режущим инструментом'},
        {value:'油液辅料管理/Oil, Fluid & Auxiliary Material Management/Управление маслами, жидкостями и вспомогательными материалами', label:'油液辅料管理/Oil, Fluid & Auxiliary Material Management/Управление маслами, жидкостями и вспомогательными материалами'},
        {value:'设备管理/Equipment Management/Управление оборудованием', label:'设备管理/Equipment Management/Управление оборудованием'},
        {value:'清洁度管理/Cleanliness Management/Управление чистотой', label:'清洁度管理/Cleanliness Management/Управление чистотой'},
        {value:'标准作业管理/Standard Work Management/Управление стандартными работами', label:'标准作业管理/Standard Work Management/Управление стандартными работами'},
        {value:'工艺管理/Process Management/Управление технологическими процессами', label:'工艺管理/Process Management/Управление технологическими процессами'},
        {value:'变更管理/Change Management/Управление изменениями', label:'变更管理/Change Management/Управление изменениями'},
        {value:'旁路管理/Bypass Management/Управление обходными путями', label:'旁路管理/Bypass Management/Управление обходными путями'},
        {value:'变化点/Change Point/Точка изменения', label:'变化点/Change Point/Точка изменения'},
        {value:'过程能力/Process Capability/Способность процесса', label:'过程能力/Process Capability/Способность процесса'},
        {value:'先进先出/First-In-First-Out/Первым пришёл — первым ушёл', label:'先进先出/First-In-First-Out/Первым пришёл — первым ушёл'},
        {value:'物流管理/Logistics Management/Управление логистикой', label:'物流管理/Logistics Management/Управление логистикой'},
        {value:'产品防护/Product Protection/Защита продукции', label:'产品防护/Product Protection/Защита продукции'},
        {value:'追溯管理/Traceability Management/Управление прослеживаемостью', label:'追溯管理/Traceability Management/Управление прослеживаемостью'}
      ],
      //问题类型选择器变量：
      problemTypeOptions: [
        {value:'标准作业不执行/Non-compliance with standard work/Несоблюдение стандартных операций', label:'标准作业不执行/Non-compliance with standard work/Несоблюдение стандартных операций'},
        {value:'无标准/No standard/Отсутствие стандарта', label:'无标准/No standard/Отсутствие стандарта'},
        {value:'标准转化错误/Incorrect translation of standard/Ошибка в адаптации стандарта', label:'标准转化错误/Incorrect translation of standard/Ошибка в адаптации стандарта'},
        {value:'标准作业执行不到位/Inadequate implementation of standard work/Неадекватное выполнение стандартных операций', label:'标准作业执行不到位/Inadequate implementation of standard work/Неадекватное выполнение стандартных операций'},
        {value:'工装问题/Tooling problem/Проблема с оснасткой', label:'工装问题/Tooling problem/Проблема с оснасткой'},
        {value:'设备问题/Equipment problem/Проблема с оборудованием', label:'设备问题/Equipment problem/Проблема с оборудованием'},
        {value:'包装问题/Packaging problem/Проблема с упаковкой', label:'包装问题/Packaging problem/Проблема с упаковкой'},
        {value:'工艺问题/Process problem/Технологическая проблема', label:'工艺问题/Process problem/Технологическая проблема'},
        {value:'执行问题/Execution problem/Проблема исполнения', label:'执行问题/Execution problem/Проблема исполнения'},
        {value:'清洁度问题/Cleanliness problem/Проблема чистоты', label:'清洁度问题/Cleanliness problem/Проблема чистоты'},
        {value:'辅料问题/Auxiliary material problem/Проблема со вспомогательными материалами', label:'辅料问题/Auxiliary material problem/Проблема со вспомогательными материалами'},
        {value:'程序问题/Procedure problem/Проблема с процедурой', label:'程序问题/Procedure problem/Проблема с процедурой'},
        {value:'变化点问题/Change point problem/Проблема с точкой изменения', label:'变化点问题/Change point problem/Проблема с точкой изменения'},
        {value:'转储问题/Transfer problem/Проблема передачи', label:'转储问题/Transfer problem/Проблема передачи'},
      ],
      //问题分类选择器变量：
      problemClassificationOptions: [
        {value:'人/Man/Человек', label:'人/Man/Человек'},
        {value:'机/Machine/Машина', label:'机/Machine/Машина'},
        {value:'料/Material/Материал', label:'料/Material/Материал'},
        {value:'法/Method/Метод', label:'法/Method/Метод'},
        {value:'环/Environment/Среда', label:'环/Environment/Среда'},
        {value:'测/Measurement/Измерение', label:'测/Measurement/Измерение'},
      ],
      //体系文件的选择变量
      systemOptions: systemOptions,
      //部门选择器变量：
      departmentOptions: [
        {value:'机加/Machining Workshop/Обработки линия', label:'机加/Machining Workshop/Обработки линия'},
        {value:'装配/Assembly Workshop/Сборочная линия', label:'装配/Assembly Workshop/Сборочная линия'},
        {value:'产技/Product Technology/Технология продукции', label:'产技/Product Technology/Технология продукции'},
        {value:'品管/Quality Management/Управления качеством', label:'品管/Quality Management/Управления качеством'},
        {value:'制技/Manufacture Tech/Tехнологии производства', label:'制技/Manufacture Tech/Tехнологии производства'},
        {value:'物流/Logistics Department/Отдел логистики', label:'物流/Logistics Department/Отдел логистики'},
        {value:'设备/Maintenance Utility/Oбслуживания оборудования', label:'设备/Maintenance Utility/Oбслуживания оборудования'},
        {value:'各车间科室/All/Все', label:'各车间科室/All/Все'}
      ],
      //审核问题效果确认选择器变量：
      effectConfirmationOptions: [
        {value:'有效/Effective/Эффективный', label:'有效/Effective/Эффективный'},
        {value:'无效/Ineffective/Неэффективный', label:'无效/Ineffective/Неэффективный'},
      ],
      //审核问题是否关闭选择器变量：
      problemCloseOptions: [
        {value:'yes', label:'yes'},
        {value:'no', label:'no'},
      ],
    }
  },

  //———————————————————————————————————————————————————————————————————————————————
  //———————————————————————————————————————————————————————————————————————————————
  watch: {
    'standardWorkSuperviseForm.workshop'(newData) {
      //上层下拉菜单变更后，后续的下拉菜单内的内容清空
      if (this.standardWorkSuperviseDoe === 1) {
        this.standardWorkSuperviseForm.line = ''
        this.standardWorkSuperviseForm.op = ''
      }
      this.lineOptions = []
      this.opOptions = []
      //控制下拉菜单选择器，如果第一个选择为装试车间，线体和工序筛选仅剩对应选项。
      if (newData === '装配车间/Assembly workshop/Сборочная Цех') {
        this.lineOptions = [
          {
            value: '总成线/Assembly line/сборочная линия',
            label: '总成线/Assembly line/сборочная линия'
          },
          {
            value: '缸盖分装线/Cylinder head assembly line/сборочная линия головки блока цилиндров',
            label: '缸盖分装线/Cylinder head assembly line/сборочная линия головки блока цилиндров'
          },
          {
            value: '热试线/Hot test line/Тепловая линия',
            label: '热试线/Hot test line/Тепловая линия'
          }
        ]
        this.opOptions = [
          {
            value: 'OP10', label: 'OP10'
          }, {
            value: 'OP20', label: 'OP20'
          }, {
            value: 'OP30', label: 'OP30'
          }, {
            value: 'OP30-1', label: 'OP30-1'
          }, {
            value: 'OP40', label: 'OP40'
          }, {
            value: 'OP50', label: 'OP50'
          }, {
            value: 'OP60', label: 'OP60'
          }, {
            value: 'OP70', label: 'OP70'
          }, {
            value: 'OP80', label: 'OP80'
          }, {
            value: 'OP90', label: 'OP90'
          }, {
            value: 'OP100', label: 'OP100'
          }, {
            value: 'OP105', label: 'OP105'
          }, {
            value: 'OP110', label: 'OP110'
          }, {
            value: 'OP120', label: 'OP120'
          }, {
            value: 'OP130', label: 'OP130'
          }, {
            value: 'OP140', label: 'OP140'
          }, {
            value: 'OP150', label: 'OP150'
          }, {
            value: 'OP155', label: 'OP155'
          }, {
            value: 'OP160', label: 'OP160'
          }, {
            value: 'OP170', label: 'OP170'
          }, {
            value: 'OP180', label: 'OP180'
          }, {
            value: 'OP190', label: 'OP190'
          }, {
            value: 'OP200', label: 'OP200'
          }, {
            value: 'OP210', label: 'OP210'
          }, {
            value: 'OP220', label: 'OP220'
          }, {
            value: 'OP230', label: 'OP230'
          }, {
            value: 'OP240', label: 'OP240'
          }, {
            value: 'OP240-1', label: 'OP240-1'
          }, {
            value: 'OP250', label: 'OP250'
          }, {
            value: 'OP260', label: 'OP260'
          }, {
            value: 'OP270', label: 'OP270'
          }, {
            value: 'OP275', label: 'OP275'
          }, {
            value: 'OP280-1', label: 'OP280-1'
          }, {
            value: 'OP280-2', label: 'OP280-2'
          }, {
            value: 'OP280-3', label: 'OP280-3'
          }, {
            value: 'OP280-4', label: 'OP280-4'
          }, {
            value: 'OP280-5', label: 'OP280-5'
          }, {
            value: 'OP290', label: 'OP290'
          }, {
            value: 'OP300', label: 'OP300'
          }, {
            value: 'OP310', label: 'OP310'
          }, {
            value: 'OP320', label: 'OP320'
          }, {
            value: 'OP330', label: 'OP330'
          }, {
            value: 'OP340', label: 'OP340'
          }, {
            value: 'OP350-1', label: 'OP350-1'
          }, {
            value: 'OP350', label: 'OP350'
          }, {
            value: 'OP360', label: 'OP360'
          }, {
            value: 'OP370', label: 'OP370'
          }, {
            value: 'OP380', label: 'OP380'
          }, {
            value: 'OP390-1', label: 'OP390-1'
          }, {
            value: 'OP390-2', label: 'OP390-2'
          }, {
            value: 'OP390', label: 'OP390'
          }, {
            value: 'OP400', label: 'OP400'
          }, {
            value: 'OP410-1', label: 'OP410-1'
          }, {
            value: 'OP410', label: 'OP410'
          }, {
            value: 'OP420', label: 'OP420'
          }, {
            value: 'OP430', label: 'OP430'
          }, {
            value: 'OP440-1', label: 'OP440-1'
          }, {
            value: 'OP440', label: 'OP440'
          }, {
            value: 'OP450', label: 'OP450'
          }, {
            value: 'OP460', label: 'OP460'
          }, {
            value: 'OP470', label: 'OP470'
          }, {
            value: 'OP480', label: 'OP480'
          }, {
            value: 'OP490', label: 'OP490'
          }, {
            value: 'OP500', label: 'OP500'
          }, {
            value: 'OP510', label: 'OP510'
          }, {
            value: 'OPHL10', label: 'OPHL10'
          }, {
            value: 'OPHL20', label: 'OPHL20'
          }, {
            value: 'OPHL30', label: 'OPHL30'
          }, {
            value: 'OPGG10', label: 'OPGG10'
          }, {
            value: 'OPGG20', label: 'OPGG20'
          }, {
            value: 'OPGG30', label: 'OPGG30'
          }, {
            value: 'OPGG40', label: 'OPGG40'
          }, {
            value: 'OPGG45', label: 'OPGG45'
          }, {
            value: 'OPGG50', label: 'OPGG50'
          },]
      }
      else if (newData === '机加车间/Machining workshop/Обработки Цех') {
        this.lineOptions = [
          {
            value: '缸体线/Cylinder block line/ линия блока цилиндров',
            label: '缸体线/Cylinder block line/ линия блока цилиндров'
          },
          {
            value: '缸盖线/Cylinder head line/линия головки блока цилиндров',
            label: '缸盖线/Cylinder head line/линия головки блока цилиндров'
          }
        ]
        //机加车间线体的工序清单。
        this.opOptions = [
          {
            value: 'OP05', label: 'OP05'
          }, {
            value: 'OP10', label: 'OP10'
          }, {
            value: 'OP20', label: 'OP20'
          }, {
            value: 'OP30', label: 'OP30'
          }, {
            value: 'OP30A', label: 'OP30A'
          }, {
            value: 'OP30B', label: 'OP30B'
          }, {
            value: 'OP40', label: 'OP40'
          }, {
            value: 'OP50', label: 'OP50'
          }, {
            value: 'OP60', label: 'OP60'
          }, {
            value: 'OP70', label: 'OP70'
          }, {
            value: 'OP80', label: 'OP80'
          }, {
            value: 'OP90', label: 'OP90'
          }, {
            value: 'OP100', label: 'OP100'
          }, {
            value: 'OP105', label: 'OP105'
          }, {
            value: 'OP110', label: 'OP110'
          }, {
            value: 'OP120', label: 'OP120'
          }, {
            value: 'OP130', label: 'OP130'
          }, {
            value: 'OP135', label: 'OP135'
          }, {
            value: 'OP140', label: 'OP140'
          }, {
            value: 'OP150', label: 'OP150'
          }, {
            value: 'OP160', label: 'OP160'
          }, {
            value: 'OP170', label: 'OP170'
          }, {
            value: 'OP180', label: 'OP180'
          }, {
            value: 'OP190', label: 'OP190'
          }, {
            value: 'OP200', label: 'OP200'
          },]
      }
    },
    //当PDF文档搜索输入框清空时，恢复显示所有数据
    'searchQuery'(newVal) {
      if (!newVal.trim()) {
        this.searchPdfDocument();
      }
    },
    //当下载表单搜索输入框清空时，恢复显示所有数据
    'searchQueryForm'(newVal) {
      if (!newVal.trim()) {
        this.searchFormDocument();
      }
    },
    //确保在 DOM 渲染完成后初始化
    workBookHeardUse(newVal) {
      this.$nextTick(() => {
        if (newVal === 2 && !this.chartUserBor) {
          this.initChart();
        } else if (newVal !== 2 && this.chartUserBor) {
          this.chartUserBor.dispose();
          this.chartUserBor = null;
        }
      });
    },
  },

  //———————————————————————————————————————————————————————————————————————————————
  //———————————————————————————————————————————————————————————————————————————————
  methods: {
    //查询用户信息的函数
    inquiry() {
      //输入用户编号，向后端查询信息
      const useId = localStorage.getItem('userName').replace(/"/g, '');
      this.$request.post('/useQueryPower', {
        queryFiledName: 'toExamineProblem',
        userId: useId,
      }).then(result => {
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        } else {
          this.useName = result.data.name
          this.usePower = result.data.toExamineProblem
          this.useId = useId
        }
      })
    },
    //退出登录
    logOut() {
      localStorage.removeItem('u_token');
      localStorage.removeItem('userName')
      this.$router.push('UserLogin')
    },
    //选择语言
    languageSelect(language) {
      this.languageS = language
      if (language === 'chinese') {
        this.main.qualityManagementSystem='俄动力质量管理系统 '
        this.main.systemManagementSystem='体系管理系统'
        this.main.description='请先选择左侧导航以查看内容'
        this.main.viewDocument='查阅文件'
        this.main.systemCheck='体系审核'
        this.main.cancel='取 消'
        this.main.ok='确 定'
        this.main.select='请选择'
        this.main.selectDate='选择日期'
        this.main.chinese='中文'
        this.main.english='英文'
        this.main.russian='俄文'
        this.main.sureToDelete='确定删除吗？'

        this.pageVal.pdfDocument.pdfDocument='PDF文档'
        this.pageVal.pdfDocument.uploadDocument='上传文档'
        this.pageVal.pdfDocument.clickToUpload='点击上传文档'
        this.pageVal.pdfDocument.onlyPdf='只能上传PDF文件'
        this.pageVal.pdfDocument.confirmToUpload='确认上传'
        this.pageVal.pdfDocument.consultDocument='查阅文档：请输入文件名称或编号'
        this.pageVal.pdfDocument.order='序号'
        this.pageVal.pdfDocument.number='文件编号'
        this.pageVal.pdfDocument.name='文件名称'
        this.pageVal.pdfDocument.name_english='文件名称_英'
        this.pageVal.pdfDocument.name_russian='文件名称_俄'
        this.pageVal.pdfDocument.version_number='版本号'
        this.pageVal.pdfDocument.upload_person='上传人'
        this.pageVal.pdfDocument.upload_time='上传日期'
        this.pageVal.pdfDocument.revise_time='修改日期'
        this.pageVal.pdfDocument.operate='操作'
        this.pageVal.pdfDocument.pdfView='PDF预览'

        this.pageVal.downloadForm.downloadForm='下载表单'
        this.pageVal.downloadForm.number='表单编号'
        this.pageVal.downloadForm.name='表单名称'
        this.pageVal.downloadForm.name_english='表单名称_英'
        this.pageVal.downloadForm.name_russian='表单名称_俄'

        this.pageVal.systemDocument.systemDocument='体系文件'

        this.pageVal.standardWork.standardWork='体系审核标准'
        this.pageVal.standardWork.add='添加'
        this.pageVal.standardWork.filter='重置筛选'
        this.pageVal.standardWork.workshop='车间名称'
        this.pageVal.standardWork.line='线体'
        this.pageVal.standardWork.op='工序'
        this.pageVal.standardWork.project='审核项目'
        this.pageVal.standardWork.requirement='审核要求'
        this.pageVal.standardWork.edit='编辑'

        this.pageVal.standardModule.standardModule='标准块'
        this.pageVal.standardModule.standard_module_name='标准块名称'
        this.pageVal.standardModule.standard_module_name_english='标准块名称_英'
        this.pageVal.standardModule.standard_module_name_russian='标准块名称_俄'
        this.pageVal.standardModule.audit_link='审核环节'
        this.pageVal.standardModule.audit_project='审核项目'
        this.pageVal.standardModule.audit_project_english='审核项目_英'
        this.pageVal.standardModule.audit_project_russian='审核项目_俄'
        this.pageVal.standardModule.audit_requirement='审核要求'
        this.pageVal.standardModule.audit_requirement_english='审核要求_英'
        this.pageVal.standardModule.audit_requirement_russian='审核要求_俄'
        this.pageVal.standardModule.step='步骤'
        this.pageVal.standardModule.audit_instruction='审核指导书'
        this.pageVal.standardModule.problem_level='问题等级'
        this.pageVal.standardModule.time='用时'
        this.pageVal.standardModule.section='责任科室'
        this.pageVal.standardModule.related_document1='关联文件1'
        this.pageVal.standardModule.related_document2='关联文件2'
        this.pageVal.standardModule.related_document3='关联文件3'
        this.pageVal.standardModule.iFTA_clause='IFTA条款'
        this.pageVal.standardModule.system_document_association='公司体系文件关联'
        this.pageVal.standardModule.instruction='要领书/指导书'
        this.pageVal.standardModule.manHour='工时'
        this.pageVal.standardModule.picture='图片'
        this.pageVal.standardModule.video='视频'
        this.pageVal.standardModule.stepContent='步骤内容'
        this.pageVal.standardModule.attentionPoint='注意点'
        this.pageVal.standardModule.workTime='工步用时(单位min)'

        this.pageVal.problemManagement.problemManagement='审核问题管理'
        this.pageVal.problemManagement.audit_source='审核来源'
        this.pageVal.problemManagement.audit_date='审核日期'
        this.pageVal.problemManagement.auditor='问题审核人'
        this.pageVal.problemManagement.process='过程'
        this.pageVal.problemManagement.problem_type='问题类型'
        this.pageVal.problemManagement.problem_classification='问题分类'
        this.pageVal.problemManagement.file_name='文件名称'
        this.pageVal.problemManagement.clause_number='条款编号'
        this.pageVal.problemManagement.problem_photo='问题照片'
        this.pageVal.problemManagement.problem_description='问题描述'
        this.pageVal.problemManagement.reason='原因'
        this.pageVal.problemManagement.correct='整改措施'
        this.pageVal.problemManagement.corrective_action='纠正措施'
        this.pageVal.problemManagement.prevention_action='预防措施'
        this.pageVal.problemManagement.completion_time='完成时间'
        this.pageVal.problemManagement.evidence_upload='证据上传'
        this.pageVal.problemManagement.department='责任部门'
        this.pageVal.problemManagement.measure_maker='措施制定人'
        this.pageVal.problemManagement.responsible_person='责任人'
        this.pageVal.problemManagement.audit_person='审批人'
        this.pageVal.problemManagement.approver='批准人'
        this.pageVal.problemManagement.message='留言'
        this.pageVal.problemManagement.completion_mark='完成标记'
        this.pageVal.problemManagement.incentive_explanation='激励说明'
        this.pageVal.problemManagement.effectEvaluation='效果评价'
        this.pageVal.problemManagement.effect_confirmation='效果确认'
        this.pageVal.problemManagement.notes='备注'
        this.pageVal.problemManagement.confirmer='确认人'
        this.pageVal.problemManagement.confirmation_time='确认时间'
        this.pageVal.problemManagement.problem_close='问题关闭'
      }
      else if (language === 'english') {
        this.main.qualityManagementSystem='Quality Management System '
        this.main.systemManagementSystem='System Management System'
        this.main.description='Please select the left navigation first to view the content'
        this.main.viewDocument='Consult Document'
        this.main.systemCheck='System Audit'
        this.main.cancel='Cancel'
        this.main.ok='OK'
        this.main.select='Select'
        this.main.selectDate='Select Date'
        this.main.chinese='Chinese'
        this.main.english='English'
        this.main.russian='Russian'
        this.main.sureToDelete='Sure to Delete?'

        this.pageVal.pdfDocument.pdfDocument='PDF Document'
        this.pageVal.pdfDocument.uploadDocument='Upload Document'
        this.pageVal.pdfDocument.clickToUpload='Click to upload'
        this.pageVal.pdfDocument.onlyPdf='Only PDF files can be uploaded'
        this.pageVal.pdfDocument.confirmToUpload='Upload'
        this.pageVal.pdfDocument.consultDocument='Consult document: enter name or number'
        this.pageVal.pdfDocument.order='Order'
        this.pageVal.pdfDocument.number='Number'
        this.pageVal.pdfDocument.name='Name'
        this.pageVal.pdfDocument.name_english='Name_English'
        this.pageVal.pdfDocument.name_russian='Name_Russian'
        this.pageVal.pdfDocument.version_number='Version Number'
        this.pageVal.pdfDocument.upload_person='Upload Person'
        this.pageVal.pdfDocument.upload_time='Upload Time'
        this.pageVal.pdfDocument.revise_time='Revise Time'
        this.pageVal.pdfDocument.operate='Operate'
        this.pageVal.pdfDocument.pdfView='Preview'

        this.pageVal.downloadForm.downloadForm='Download Form'
        this.pageVal.downloadForm.number='Number'
        this.pageVal.downloadForm.name='Name'
        this.pageVal.downloadForm.name_english='Name_English'
        this.pageVal.downloadForm.name_russian='Name_Russian'

        this.pageVal.systemDocument.systemDocument='System Document'

        this.pageVal.standardWork.standardWork='System Audit Standards'
        this.pageVal.standardWork.add='Add'
        this.pageVal.standardWork.filter='Reset filter'
        this.pageVal.standardWork.workshop='Workshop'
        this.pageVal.standardWork.line='Line'
        this.pageVal.standardWork.op='OP'
        this.pageVal.standardWork.project='Project'
        this.pageVal.standardWork.requirement='Requirement'
        this.pageVal.standardWork.edit='Edit'

        this.pageVal.standardModule.standardModule='Standard Module'
        this.pageVal.standardModule.standard_module_name='Standard Module Name'
        this.pageVal.standardModule.standard_module_name_english='Standard Module Name_English'
        this.pageVal.standardModule.standard_module_name_russian='Standard Module Name_Russian'
        this.pageVal.standardModule.audit_link='Audit Stage'
        this.pageVal.standardModule.audit_project='Audit Item'
        this.pageVal.standardModule.audit_project_english='Audit Item_English'
        this.pageVal.standardModule.audit_project_russian='Audit Item_Russian'
        this.pageVal.standardModule.audit_requirement='Audit Requirement'
        this.pageVal.standardModule.audit_requirement_english='Audit Requirement_English'
        this.pageVal.standardModule.audit_requirement_russian='Audit Requirement_Russian'
        this.pageVal.standardModule.step='Step'
        this.pageVal.standardModule.audit_instruction='Audit Instruction'
        this.pageVal.standardModule.problem_level='Problem Level'
        this.pageVal.standardModule.time='Time'
        this.pageVal.standardModule.section='Department'
        this.pageVal.standardModule.related_document1='Associated Document1'
        this.pageVal.standardModule.related_document2='Associated Document2'
        this.pageVal.standardModule.related_document3='Associated Document3'
        this.pageVal.standardModule.iFTA_clause='IFTA Clause'
        this.pageVal.standardModule.system_document_association='System Document Association'
        this.pageVal.standardModule.instruction='Instruction'
        this.pageVal.standardModule.manHour='Man-hour'
        this.pageVal.standardModule.picture='Picture'
        this.pageVal.standardModule.video='Video'
        this.pageVal.standardModule.stepContent='Step Content'
        this.pageVal.standardModule.attentionPoint='Attention Point'
        this.pageVal.standardModule.workTime='Work Time(min)'

        this.pageVal.problemManagement.problemManagement='Audit issue management'
        this.pageVal.problemManagement.audit_source='Audit Source'
        this.pageVal.problemManagement.audit_date='Audit Date'
        this.pageVal.problemManagement.auditor='Auditor'
        this.pageVal.problemManagement.process='Process'
        this.pageVal.problemManagement.problem_type='Problem Type'
        this.pageVal.problemManagement.problem_classification='Problem Classification'
        this.pageVal.problemManagement.file_name='File Name'
        this.pageVal.problemManagement.clause_number='Clause Number'
        this.pageVal.problemManagement.problem_photo='Problem Photo'
        this.pageVal.problemManagement.problem_description='Problem Description'
        this.pageVal.problemManagement.reason='Reason'
        this.pageVal.problemManagement.correct='Action'
        this.pageVal.problemManagement.corrective_action='Corrective Action'
        this.pageVal.problemManagement.prevention_action='Preventive Action'
        this.pageVal.problemManagement.completion_time='Completion Time'
        this.pageVal.problemManagement.evidence_upload='Evidence Upload'
        this.pageVal.problemManagement.department='Department'
        this.pageVal.problemManagement.measure_maker='Measure Maker'
        this.pageVal.problemManagement.responsible_person='Responsible Person'
        this.pageVal.problemManagement.audit_person='Audit Person'
        this.pageVal.problemManagement.approver='Approver'
        this.pageVal.problemManagement.message='Message'
        this.pageVal.problemManagement.completion_mark='Completion Mark'
        this.pageVal.problemManagement.incentive_explanation='Incentive Explanation'
        this.pageVal.problemManagement.effectEvaluation='Effect Evaluation'
        this.pageVal.problemManagement.effect_confirmation='Effect Confirmation'
        this.pageVal.problemManagement.notes='Notes'
        this.pageVal.problemManagement.confirmer='Confirmer'
        this.pageVal.problemManagement.confirmation_time='Confirmation Time'
        this.pageVal.problemManagement.problem_close='Is closed?'
      }
      else if (language === 'russian') {
        this.main.qualityManagementSystem='Cистема yправления качества'
        this.main.systemManagementSystem='Система управления системой'
        this.main.description='Пожалуйста, выберите левую навигацию для просмотра контента'
        this.main.viewDocument='Консультировать документ'
        this.main.systemCheck='Системный аудит'
        this.main.cancel='Отменить'
        this.main.ok='Подтвердить'
        this.main.select='Выберите'
        this.main.selectDate='Выберите дату'
        this.main.chinese='Китайский'
        this.main.english='Aнглийский'
        this.main.russian='Русский'
        this.main.sureToDelete='Уверен в удалении?'

        this.pageVal.pdfDocument.pdfDocument='PDF документ'
        this.pageVal.pdfDocument.uploadDocument='Загрузить документ'
        this.pageVal.pdfDocument.clickToUpload='Нажмите, чтобы загрузить'
        this.pageVal.pdfDocument.onlyPdf='Загрузить можно только PDF-файлы'
        this.pageVal.pdfDocument.confirmToUpload='Загрузить'
        this.pageVal.pdfDocument.consultDocument='Проверьте документ: введите имя или номер'
        this.pageVal.pdfDocument.order='Заказ'
        this.pageVal.pdfDocument.number='Номер'
        this.pageVal.pdfDocument.name='Имя'
        this.pageVal.pdfDocument.name_english='Имя_Английский'
        this.pageVal.pdfDocument.name_russian='Имя_Русский'
        this.pageVal.pdfDocument.version_number='Номер версии'
        this.pageVal.pdfDocument.upload_person='Загрузить человека'
        this.pageVal.pdfDocument.upload_time='Время загрузки'
        this.pageVal.pdfDocument.revise_time='Пересмотреть время'
        this.pageVal.pdfDocument.operate='Операция'
        this.pageVal.pdfDocument.pdfView='Предварительный просмотр'

        this.pageVal.downloadForm.downloadForm='Скачать форму'
        this.pageVal.downloadForm.number='Номер'
        this.pageVal.downloadForm.name='Имя'
        this.pageVal.downloadForm.name_english='Имя_Английский'
        this.pageVal.downloadForm.name_russian='Имя_Русский'

        this.pageVal.systemDocument.systemDocument='Системный документ'

        this.pageVal.standardWork.standardWork='Стандарты аудита системы'
        this.pageVal.standardWork.add='Добавить'
        this.pageVal.standardWork.filter='Сбросить фильтр'
        this.pageVal.standardWork.workshop='Семинар'
        this.pageVal.standardWork.line='Лине'
        this.pageVal.standardWork.op='Операция'
        this.pageVal.standardWork.project='Проект'
        this.pageVal.standardWork.requirement='Требования'
        this.pageVal.standardWork.edit='Редактировать'

        this.pageVal.standardModule.standardModule='Стандартный блок'
        this.pageVal.standardModule.standard_module_name='Наименование стандартного блока_Китайский'
        this.pageVal.standardModule.standard_module_name_english='Наименование стандартного блока_Aнглийский'
        this.pageVal.standardModule.standard_module_name_russian='Наименование стандартного блока_Русский'
        this.pageVal.standardModule.audit_link='Этап аудита'
        this.pageVal.standardModule.audit_project='Пункт аудита_Китайский'
        this.pageVal.standardModule.audit_project_english='Пункт аудита_Aнглийский'
        this.pageVal.standardModule.audit_project_russian='Пункт аудита_Русский'
        this.pageVal.standardModule.audit_requirement='Требование аудита_Китайский'
        this.pageVal.standardModule.audit_requirement_english='Требование аудита_Aнглийский'
        this.pageVal.standardModule.audit_requirement_russian='Требование аудита_Русский'
        this.pageVal.standardModule.step='Шаг'
        this.pageVal.standardModule.audit_instruction='Руководство по аудиту'
        this.pageVal.standardModule.problem_level='Уровень проблемы'
        this.pageVal.standardModule.time='Время'
        this.pageVal.standardModule.section='Отдел'
        this.pageVal.standardModule.related_document1='Связанный документ1'
        this.pageVal.standardModule.related_document2='Связанный документ2'
        this.pageVal.standardModule.related_document3='Связанный документ3'
        this.pageVal.standardModule.iFTA_clause='Пункт IFTA'
        this.pageVal.standardModule.system_document_association='Связь с системными документами'
        this.pageVal.standardModule.instruction='Инструкция'
        this.pageVal.standardModule.manHour='Рабочее время'
        this.pageVal.standardModule.picture='Изображение'
        this.pageVal.standardModule.video='Видео'
        this.pageVal.standardModule.stepContent='Содержание шага'
        this.pageVal.standardModule.attentionPoint='Точка внимания'
        this.pageVal.standardModule.workTime='Время работы(минуты)'

        this.pageVal.problemManagement.problemManagement='Управление вопросами аудита'
        this.pageVal.problemManagement.audit_source='Источник аудита'
        this.pageVal.problemManagement.audit_date='Дата аудита'
        this.pageVal.problemManagement.auditor='Аудитор'
        this.pageVal.problemManagement.process='Процесс'
        this.pageVal.problemManagement.problem_type='Тип проблемы'
        this.pageVal.problemManagement.problem_classification='Классификация проблем'
        this.pageVal.problemManagement.file_name='Имя файла'
        this.pageVal.problemManagement.clause_number='Номер пункта'
        this.pageVal.problemManagement.problem_photo='Проблема Фото'
        this.pageVal.problemManagement.problem_description='Описание проблемы'
        this.pageVal.problemManagement.reason='Причина'
        this.pageVal.problemManagement.correct='Действия'
        this.pageVal.problemManagement.corrective_action='Коррективные действия'
        this.pageVal.problemManagement.prevention_action='Превентивные действия'
        this.pageVal.problemManagement.completion_time='Время завершения'
        this.pageVal.problemManagement.evidence_upload='Загрузка доказательств'
        this.pageVal.problemManagement.department='Департамент'
        this.pageVal.problemManagement.measure_maker='Разработчики мер'
        this.pageVal.problemManagement.responsible_person='Ответственное лицо'
        this.pageVal.problemManagement.audit_person='Лицо аудита'
        this.pageVal.problemManagement.approver='Утверждение'
        this.pageVal.problemManagement.message='Сообщение'
        this.pageVal.problemManagement.completion_mark='Знак завершения'
        this.pageVal.problemManagement.incentive_explanation='Пояснение стимулов'
        this.pageVal.problemManagement.effectEvaluation='Оценка воздействия'
        this.pageVal.problemManagement.effect_confirmation='Подтверждение эффекта'
        this.pageVal.problemManagement.notes='Примечания'
        this.pageVal.problemManagement.confirmer='Подтверждение'
        this.pageVal.problemManagement.confirmation_time='Время подтверждения'
        this.pageVal.problemManagement.problem_close='Закрыто?'
      }
    },
    //自动翻译
    translate(doe){
      //审核问题问题描述
      if (doe===1){
        if (this.problem_description_tab==='chinese'){
          this.problem_description_loading=true
          translate_zh_en_ru(this.inputTextChinese,'zh',1).then(data=>{
            this.inputTextEnglish=data.en
            this.inputTextRussian=data.ru
            this.problem_description_loading=false
          })
        }
        else if (this.problem_description_tab==='english') {
          //判断用户在那个tab上，确定是那个语言
          // 创建包含两个翻译请求的Promise数组
          // 中文翻译
          this.problem_description_loading = true
          translate_zh_en_ru(this.inputTextEnglish, 'en', 1).then(data => {
            this.inputTextChinese=data.zh
            this.inputTextRussian=data.ru
            this.problem_description_loading = false
          })
        }
        else if (this.problem_description_tab==='russian'){
          this.problem_description_loading=true
          //判断用户在那个tab上，确定是那个语言
          translate_zh_en_ru(this.inputTextRussian, 'ru', 1).then(data => {
            this.inputTextChinese=data.zh
            this.inputTextEnglish=data.en
            this.problem_description_loading = false
          })
        }
      }
    },

    //当用户选择不同的按钮
    buttonMainSelect(doe){
      this.buttonDoe=doe
      if (doe===1){
        this.buttonBackColor1='blue'//按钮的背景颜色
        this.buttonColor1='white'//按钮的字体颜色
        this.buttonBackColor2=''//按钮的背景颜色
        this.buttonColor2=''//按钮的字体颜色
        this.buttonBackColor3=''//按钮的背景颜色
        this.buttonColor3=''//按钮的字体颜色
      }
      else if (doe===2){
        this.buttonBackColor1=''//按钮的背景颜色
        this.buttonColor1=''//按钮的字体颜色
        this.buttonBackColor2='blue'//按钮的背景颜色
        this.buttonColor2='white'//按钮的字体颜色
        this.buttonBackColor3=''//按钮的背景颜色
        this.buttonColor3=''//按钮的字体颜色
      }
      //品质评价部分
      else if (doe===3){
        this.buttonBackColor1=''//按钮的背景颜色
        this.buttonColor1=''//按钮的字体颜色
        this.buttonBackColor2=''//按钮的背景颜色
        this.buttonColor2=''//按钮的字体颜色
        this.buttonBackColor3='blue'//按钮的背景颜色
        this.buttonColor3='white'//按钮的字体颜色
      }
    },
    //在tab控件上单击的函数
    handleClick(tab, event) {
      console.log(tab, event);
      if (this.activeName==='standardModule'){
        // 查询标准块总条目
        this.queryStandardModuleQuantity().then(data => {
          this.standardModulePagination.total = data;
        });
        // 查询标准块（分页）
        this.queryStandardModuleWithPagination().then(data => {
          this.standardModuleData = data;
        });
      }
      else if (this.activeName==='auditProblemManagement'){
        // 查询审核问题总条目
        this.queryAuditProblemQuantity().then(data => {
          this.auditProblemPagination.total = data;
        });
        // 查询审核问题（分页）
        this.queryAuditProblemWithPagination().then(data => {
          this.toExamineProblemData = data;
        });
      }
    },

    //通用：误关闭弹窗的确认函数(中英俄)
    getI18nText(key) {
      const i18nMessages = {
        chinese: {
          confirmClose: '确认关闭？',
          confirmButton: '确定',
          cancelButton: '取消',
        },
        english: {
          confirmClose: 'Sure to close?',
          confirmButton: 'OK',
          cancelButton: 'Cancel',
        },
        russian: {
          confirmClose: 'Уверен в закрытии?',
          confirmButton: 'Подтвердить',
          cancelButton: 'Отмена',
        },
      };
      return i18nMessages[this.languageS]?.[key] ?? i18nMessages.chinese[key];
    },
    //关闭弹窗的提示
    handleClose(done) {
      this.$confirm(
          this.getI18nText('confirmClose'), // 消息内容
          {
            confirmButtonText: this.getI18nText('confirmButton'), // 确认按钮
            cancelButtonText: this.getI18nText('cancelButton'),    // 取消按钮
          }
      )
          .then(() => done())
          .catch(() => {});
    },
    //通用：得到UUID的id数据
    generateUUIDv4() {
      const bytes = new Uint8Array(16);
      crypto.getRandomValues(bytes);

      // 设置版本位（第6字节的高4位为0100）
      bytes[6] = (bytes[6] & 0x0f) | 0x40;
      // 设置变体位（第8字节的高2位为10）
      bytes[8] = (bytes[8] & 0x3f) | 0x80;

      // 转换为32字符十六进制字符串
      return Array.from(bytes, byte => {
        return byte.toString(16).padStart(2, '0');
      }).join('');
    },

    // 日期时间格式化方法
    // 日期格式化方法
    formatDateTime(date) {
      if (!date) return '';
      // 如果是日期对象
      if (date instanceof Date) {
        const year = date.getFullYear();
        const month = String(date.getMonth() + 1).padStart(2, '0');
        const day = String(date.getDate()).padStart(2, '0');
        return `${year}-${month}-${day}`;
      }
      // 如果是字符串，尝试解析
      if (typeof date === 'string') {
        const parsedDate = new Date(date);
        if (!isNaN(parsedDate.getTime())) {
          return this.formatDateTime(parsedDate);
        }
      }
      return date; // 如果无法解析，返回原值
    },

    //初始化单个富文本
    initEditor(editorKey, refName, htmlVal) {
      // 销毁已有实例
      if (this[editorKey]) {
        this[editorKey].destroy();
        this[editorKey] = null;
      }

      const container = this.$refs[refName];
      if (!container) return;

      // 创建新实例
      this[editorKey] = new E(container);

      // 配置菜单
      this[editorKey].config.menus = [
        'head',
        'bold',
        'italic',
        'underline',
        'strikeThrough',
        'foreColor',
        'backColor',
        'list',
        'justify',
        'table'
      ];
      //创建编辑器
      this[editorKey].create();
      this[editorKey].txt.html(htmlVal)
    },
    // 获取所有编辑器内容
    getEditorContents() {
      return {
        points: {
          chinese: this.pointsChineseEditor?.txt.html() || '',
          english: this.pointsEnglishEditor?.txt.html() || '',
          russian: this.pointsRussianEditor?.txt.html() || ''
        }
      };
    },
    // 销毁所有编辑器
    destroyAllEditors() {
      const editors = [
        'pointsChineseEditor',
        'pointsEnglishEditor',
        'pointsRussianEditor'
      ];

      editors.forEach(editorKey => {
        if (this[editorKey]) {
          this[editorKey].destroy();
          this[editorKey] = null;
        }
      });
    },

    //——————————————————————————————————————删除——————————————————————————————————————
    //删除记录的提示及锁定对应行
    deleteData(doe, scope) {
      this.deleteTableName = doe
      if (doe==='deletePdfDocument'){
        this.titleUse='删除该文件'
        this.pdfDocumentScope=scope
        this.pdfDocumentForm=_.cloneDeep(scope.row)
        this.deleteDialog = true
      }
      else if (doe==='deleteFormDocument'){
        this.titleUse='删除该文件'
        this.formDocumentScope=scope
        this.formDocumentForm=_.cloneDeep(scope.row)
        this.deleteDialog = true
      }
      else if (doe==='deleteSystemDocument'){
        this.titleUse='删除该文件'
        this.systemDocumentScope=scope
        this.systemDocumentForm=_.cloneDeep(scope.row)
        this.deleteDialog = true
      }
      else if (doe === 'deleteAuditProblem') {
        this.titleUse = '您正在删除一行审核问题'
        this.toExamineProblemScope = scope
        this.toExamineProblemForm = scope.row
        this.deleteDialog = true
      }
      else if (doe === 'standardWorkSupervise') {
        this.titleUse = '您正在删除一行监察记录'
        this.standardWorkSuperviseScope = scope
        this.standardWorkSuperviseForm = scope.row
        this.deleteDialog = true
      }
      else if (doe === 'deleteStandardModule') {
        this.titleUse = '您正在删除一行审核块'
        this.standardModuleScope = scope
        this.standardModuleForm = scope.row
        this.deleteDialog = true
      }
    },
    //点击确定删除后的一系列动作
    //1、记录要在哪个表里面删除
    //2、给服务器内的sys_deleted赋值，使其在页面上不显示
    deleteDataOk() {
      if (this.deleteTableName === 'deleteAuditProblem') {
        this.toExamineProblemForm.sys_deleted = 1
        //向后端发送数据
        this.$request.post('/editAuditProblemToExamineProblem', this.toExamineProblemForm).then(result => {
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          } else {
            this.$message.success('删除成功')
            this.toExamineProblemData.splice(this.toExamineProblemScope.$index, 1)
            this.toExamineProblemScope = null
            this.deleteDialog = false
          }
        })
      }
      else if (this.deleteTableName === 'standardWorkSupervise') {
        this.standardWorkSuperviseForm.sys_deleted = 1
        //向后端发送数据
        this.$request.post('/editOneByIdStandardWorkSuperviseToExamineProblem', this.standardWorkSuperviseForm).then(result => {
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          } else {
            this.$message.success('删除成功')
            this.standardWorkSuperviseData.splice(this.standardWorkSuperviseScope.$index, 1)
            this.standardWorkSuperviseScope = null
            this.deleteDialog = false //点击确定删除后，弹窗隐藏
          }
        })
      }
      else if (this.deleteTableName === 'deletePdfDocument') {
        this.pdfDocumentForm.sys_deleted = 1
        //向后端发送数据
        this.$request.post('/updatePdfDocumentToExamineProblem', this.pdfDocumentForm).then(result => {
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          } else {
            this.$message.success('删除成功')
            this.pdfDocumentData.splice(this.pdfDocumentScope.$index, 1)
            this.pdfDocumentScope = null
            this.deleteDialog = false //点击确定删除后，弹窗隐藏
          }
        })
      }
      else if (this.deleteTableName === 'deleteFormDocument') {
        this.formDocumentForm.sys_deleted = 1
        //向后端发送数据
        this.$request.post('/updateFormDocumentToExamineProblem', this.formDocumentForm).then(result => {
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          } else {
            this.$message.success('删除成功')
            this.formDocumentData.splice(this.formDocumentScope.$index, 1)
            this.formDocumentScope = null
            this.deleteDialog = false //点击确定删除后，弹窗隐藏
          }
        })
      }
      else if (this.deleteTableName === 'deleteStandardModule') {
        this.standardModuleForm.sys_deleted = 1
        //向后端发送数据
        this.$request.post('/editStandardModuleToExamineProblem', this.standardModuleForm).then(result => {
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          } else {
            this.$message.success('删除成功')
            this.standardModuleData.splice(this.standardModuleScope.$index, 1)
            this.standardModuleScope = null
            this.deleteDialog = false //点击确定删除后，弹窗隐藏
          }
        })
      }
      else if (this.deleteTableName === 'deleteWorkBookStandardModule') {
        //建一个临时变量，在组合数据中使用
        let temp=_.cloneDeep(this.workBook)
        temp.splice(this.workBookScope.$index,1)
        //组合成文本数据
        /*组合作业指导书的内容   注：|*|：是分割语言的；
                                         |%|：是分割每一行中的字段的，具体为:
                                         work:工作步骤|%|
                                         problem:注意点说明|%|
                                         spendTime:需要时间|%|
                                         pictureList:图片列表|%|
                                         videoList:视频列表|%|
                                         |-|分割每一行的
                                         */
        let strTemp=''
        for (let i = 0; i < temp.length; i++) {
          //如果只有一行步骤内容
          if (i===0){
            strTemp=temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+temp[i].reserve1+'|%|'+temp[i].reserve2+'|%|'+temp[i].reserve3
          }
          else {
            strTemp=strTemp+'|-|'+temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+temp[i].reserve1+'|%|'+temp[i].reserve2+'|%|'+temp[i].reserve3
          }
        }
        //向后端修改数据
        this.editByOneField(this.standardModuleScope.row.id,'audit_instruction',strTemp).then(()=>{
          this.workBook.splice(this.workBookScope.$index,1)
          //重新排布workBook的id
          for (let i = 0; i < this.workBook.length; i++) {
            this.workBook[i].id=i+1
          }
          //修改大表数据
          this.standardModuleData[this.standardModuleScope.$index].audit_instruction=strTemp
          //修改scope里的内容
          this.standardModuleScope.row.audit_instruction=strTemp
          this.deleteDialog=false
        })
      }
    },

    //——————————————————————————————————————PDF文档——————————————————————————————————————
    //查找pdf文件
    searchPdfDocument() {
      // 获取搜索关键词并去除首尾空格
      const searchTerm = this.searchQuery.trim().toLowerCase();

      // 如果搜索关键词为空，恢复显示所有数据
      if (!searchTerm) {
        this.pdfDocumentData = [...this.originalPdfDocumentData];
        return;
      }

      // 过滤pdf文档数据，检查名称、英文名或俄文名是否包含搜索词
      const filteredData = this.originalPdfDocumentData.filter(item => {
        return (
            (item.number && item.number.toLowerCase().includes(searchTerm)) ||
            (item.name && item.name.toLowerCase().includes(searchTerm)) ||
            (item.name_english && item.name_english.toLowerCase().includes(searchTerm)) ||
            (item.name_russian && item.name_russian.toLowerCase().includes(searchTerm))
        );
      });

      // 检查是否有搜索结果
      if (filteredData.length === 0) {
        this.$message.error('未搜索到指定文件');
      } else {
        // 这里处理搜索到的文件数据
        this.$message.success(`找到 ${filteredData.length} 个匹配文件`);
        this.pdfDocumentData = filteredData;
      }
    },

    //查看pdf
    documentShow(action, scope) {
      if (this.languageS==='chinese'){
        this.titleUse='PDF预览'
      }
      else if (this.languageS==='english'){
        this.titleUse='Preview'
      }
      else if (this.languageS==='russian'){
        this.titleUse='Предварительный просмотр'
      }
       this.pdfUrl = filepath+scope.row.document_path
      this.pdfShowDialog = true; // 显示弹窗
    },
    uploadDocumentShow(action, scope) {
      // 触发隐藏的 <el-upload> 组件的文件选择
      this.$refs.pdfUploader.$refs.upload.click();

      //保存当前行的 scope，用于后续关联上传文件
      this.currentEditScope = scope;
    },

    //辅助函数：生成唯一标识码的函数（利用时间戳和随机数）
    generateUniqueId() {
      return Date.now().toString() + Math.random().toString(36).slice(2, 11);
    },
    //上传pdf文件
    saveFile(file) {
      console.log(file)
      const formData = new FormData();
      //1.新生成一个文件名称,并且把文件名称的后缀添加上
      let fileName=this.generateUniqueId()+'.'+file.name.split('.')[file.name.split('.').length-1]
      //把新的文件名称放进去
      file.name=fileName
      formData.append('file', file.raw)
      this.pdfDocumentForm.id=this.generateUUIDv4()
      this.pdfDocumentForm.document_path=fileName
      formData.append('number', this.pdfDocumentForm.number);
      formData.append('name', this.pdfDocumentForm.name);
      formData.append('name_english', this.pdfDocumentForm.name_english);
      formData.append('name_russian', this.pdfDocumentForm.name_russian);
      formData.append('id', this.pdfDocumentForm.id);
      formData.append('document_path', this.pdfDocumentForm.document_path);
      formData.append('upload_person', this.useName)

      for (const [key, value] of formData.entries()) {
        console.log(key, value);
      }

      this.$requestFile.post('/addPdfDocumentToExamineProblem', formData)
          .then(result => {
            if (result.code === 401) {
              this.$router.push('UserLogin');
              alert("您未登录，请登录");
            } else if (result.data === null) {
              alert("程序出现异常，请联系管理员");
            } else {
              // 1. 刷新表格数据
              this.pdfDocumentData.push(this.pdfDocumentForm)
              this.queryPdfDocumentAll()

            }
            this.uploadDocumentDialog = false;
            // 2. 重置表单
            this.resetPdfDocumentForm();
            // 3. 清空文件列表
            this.$refs.pdfUploader.clearFiles();
          })
          .catch(error => {
            console.error('文件上传失败:', error);
            this.$message.error('文件上传失败，请重试');
          });
    },
    resetPdfDocumentForm() {
      this.pdfDocumentForm = {
        id: '',
        create_time: '',
        update_time: '',
        creator: this.useName,
        process_status: '',
        sys_update_user: '',
        sys_audit_user: '',
        sys_audit_time: '',
        sys_deleted: '',
        number: '',
        name: '',
        name_english: '',
        name_russian: '',
        version_number: '',
        upload_person: this.useName,
        upload_time: '',
        revise_time: '',
        document_path: ''
      };
    },
    handleRemove(file, fileList) {
      // 文件移除处理
      this.fileList = fileList;
    },
    beforeRemove(file, fileList) {
      console.log(fileList)
      return this.$confirm(`确定移除 ${file.name}？`);
    },
    handleExceed(files, fileList) {
      this.$message.warning(`当前限制选择 1 个文件，本次选择了 ${files.length} 个文件，共选择了 ${files.length + fileList.length} 个文件`);
    },
    handlePreview(file) {
      // 文件预览处理
      console.log(file);
    },
    handleFileChange(file, fileList) {
      this.currentFile = file;
      this.fileList = fileList.slice(-1); // 只保留最新文件
    },
    beforeUpload(file) {
      const isPDF = file.type === 'application/pdf';
      const isLt10M = file.size / 1024 / 1024 < 10;

      if (!isPDF) {
        this.$message.error('只能上传PDF格式的文件!');
      }
      if (!isLt10M) {
        this.$message.error('文件大小不能超过10MB!');
      }

      return isPDF && isLt10M;
    },
    submitUpload() {
      this.$refs.pdfDocumentFormRef.validate(valid => {
        if (valid && this.currentFile) {
          this.saveFile(this.currentFile);
        } else {
          this.$message.warning('请填写完整表单并上传文件');
        }
      });
    },

    // 显示编辑弹窗
    showEditDocumentDialog(scope) {
      this.currentEditRow = scope.row;
      this.editPdfDocumentForm = _.cloneDeep(scope.row);
      this.editDocumentDialog = true;
      this.editFileList = [];
      this.editCurrentFile = null;
    },
    // 处理编辑文件变化（点击替换PDF文件）
    handleEditFileChange(file, fileList) {
      this.editCurrentFile = file;
      this.editFileList = fileList.slice(-1);
      //1.新生成一个文件名称,并且把文件名称的后缀添加上
      let fileName=this.generateUniqueId()+'.'+file.name.split('.')[file.name.split('.').length-1]
      //把新的文件名称放进去
      this.editCurrentFile.name=fileName
    },
    // 提交编辑
    submitEditUpload() {
      this.$refs.editPdfDocumentFormRef.validate(valid => {
        if (valid) {
          if (this.editCurrentFile) {
            // 如果有新文件，先上传文件
            this.updateDocumentWithFile();
          } else {
            // 如果没有新文件，只更新信息
            this.updateDocumentInfo(this.editPdfDocumentForm);
          }
        } else {
          this.$message.warning('请填写完整表单');
        }
      });
    },
    // 更新文档信息（不替换文件）
    updateDocumentInfo(editPdfDocumentForm) {
      this.$request.post('/updatePdfDocumentToExamineProblem', editPdfDocumentForm)
          .then(result => {
            if (result.code === 401) {
              this.$router.push('UserLogin');
              this.$message.warning("您未登录，请登录");
            } else {
              this.$message.success('文档信息更新成功');
              this.queryPdfDocumentAll().then(() => {
                this.editDocumentDialog = false;
              });
            }
          })
          .catch(error => {
            console.error('更新文档信息失败:', error);
            this.$message.error('更新文档信息失败');
          });
    },
    // 更新文档并替换文件
    updateDocumentWithFile() {
      const formData = new FormData();
      formData.append('file', this.editCurrentFile.raw);
      formData.append('id', this.editPdfDocumentForm.id);
      formData.append('number', this.editPdfDocumentForm.number);
      formData.append('name', this.editPdfDocumentForm.name);
      formData.append('name_english', this.editPdfDocumentForm.name_english);
      formData.append('name_russian', this.editPdfDocumentForm.name_russian);
      formData.append('version_number', this.editPdfDocumentForm.version_number);
      formData.append('document_path', this.editPdfDocumentForm.document_path);
      formData.append('document_path_new', this.editCurrentFile.name);

      this.$requestFile.post('/updatePdfDocumentWithFileToExamineProblem', formData)
          .then(result => {
            if (result.code === 401) {
              this.$router.push('UserLogin');
              this.$message.warning("您未登录，请登录");
            } else {
              this.$message.success('文档更新成功');
              this.queryPdfDocumentAll().then(() => {
                this.editDocumentDialog = false;
              });
            }
          })
          .catch(error => {
            console.error('文档更新失败:', error);
            this.$message.error('文档更新失败');
          });
    },

    //查询所有pdf文件
    async queryPdfDocumentAll() {
      try {
        const result = await this.$request.post('/queryPdfDocumentAllToExamineProblem');
        if (result.code === 401) {
          this.$router.push('UserLogin');
          this.$message.warning("您未登录，请登录");
        } else {
          this.originalPdfDocumentData = result.data
          this.pdfDocumentData = result.data;
        }
        return result; // 返回结果以便链式调用
      } catch (error) {
        console.error('查询文档列表失败:', error);
        this.$message.error('获取文档列表失败');
        throw error;
      }
    },

    //——————————————————————————————————————下载表单——————————————————————————————————————
    //查找表单
    searchFormDocument() {
      // 获取搜索关键词并去除首尾空格
      const searchTerm = this.searchQueryForm.trim().toLowerCase();

      // 如果搜索关键词为空，恢复显示所有数据
      if (!searchTerm) {
        this.formDocumentData = [...this.originalFormDocumentData];
        return;
      }

      // 过滤pdf文档数据，检查名称、英文名或俄文名是否包含搜索词
      const filteredData = this.originalFormDocumentData.filter(item => {
        return (
            (item.number && item.number.toLowerCase().includes(searchTerm)) ||
            (item.name && item.name.toLowerCase().includes(searchTerm)) ||
            (item.name_english && item.name_english.toLowerCase().includes(searchTerm)) ||
            (item.name_russian && item.name_russian.toLowerCase().includes(searchTerm))
        );
      });

      // 检查是否有搜索结果
      if (filteredData.length === 0) {
        this.$message.error('未搜索到指定文件');
      } else {
        // 这里处理搜索到的文件数据
        this.$message.success(`找到 ${filteredData.length} 个匹配文件`);
        this.formDocumentData = filteredData;
      }
    },

    //下载表单
    downloadForm(scope){
      //向后端发送请求，下载文件
      this.$request.get('/downloadFormToExamineProblem?fileName=' + scope.row.document_path).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }
        else {
          let base64Data = 'data:application/octet-stream;base64,' + result.data
          // 创建一个Blob对象
          let blob = this.dataURItoBlob(base64Data);
          //触发下载
          //获取document_path中存储的文件格式，如（.png）
          const extension = scope.row.document_path.substring(scope.row.document_path.lastIndexOf('.'));
          // 调用下载方法下载
          this.downloadBlob(blob, scope.row.name+extension);
        }
      }).catch(error => {
        // 处理请求错误
        console.error("请求出错", error);
      })
    },

    // 辅助函数：将Base64编码的字符串转换为Blob对象
    dataURItoBlob(dataURI) {
      // 分离出头部信息,得到数据部分
      let byteString;
      if (dataURI.split(',')[0].indexOf('base64') >= 0)
        byteString = atob(dataURI.split(',')[1]);
      else
        byteString = unescape(dataURI.split(',')[1]);

      // 写入数组缓冲区
      let mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];
      let ia = new Uint8Array(byteString.length);
      for (let i = 0; i < byteString.length; i++) {
        ia[i] = byteString.charCodeAt(i);
      }
      return new Blob([ia], {type:mimeString});
    },
    // 辅助函数：触发Blob对象的下载
    downloadBlob(blob, fileName) {
      let link = document.createElement('a');
      link.href = window.URL.createObjectURL(blob);
      link.download = fileName;
      link.click();
      window.URL.revokeObjectURL(link.href);
    },

    //上传表单文件
    saveFileForm(file) {
      console.log(file)
      const formData = new FormData();
      //1.新生成一个文件名称,并且把文件名称的后缀添加上
      let fileName=this.generateUniqueId()+'.'+file.name.split('.')[file.name.split('.').length-1]
      //把新的文件名称放进去
      file.name=fileName
      formData.append('file', file.raw)
      this.formDocumentForm.id=this.generateUUIDv4()
      this.formDocumentForm.document_path=fileName
      formData.append('number', this.formDocumentForm.number);
      formData.append('name', this.formDocumentForm.name);
      formData.append('name_english', this.formDocumentForm.name_english);
      formData.append('name_russian', this.formDocumentForm.name_russian);
      formData.append('id', this.formDocumentForm.id);
      formData.append('document_path', this.formDocumentForm.document_path);
      formData.append('upload_person', this.useName)

      for (const [key, value] of formData.entries()) {
        console.log(key, value);
      }


      this.$requestFile.post('/addFormDocumentToExamineProblem', formData)
          .then(result => {
            if (result.code === 401) {
              this.$router.push('UserLogin');
              alert("您未登录，请登录");
            } else if (result.data === null) {
              alert("程序出现异常，请联系管理员");
            } else {
              // 1. 刷新表格数据
              this.formDocumentData.push(this.formDocumentForm)
              this.queryFormDocumentAll()

            }
            this.uploadFormDialog = false;
            // 2. 重置表单
            this.resetFormDocumentForm();
            // 3. 清空文件列表
            this.$refs.formUploader.clearFiles();
          })
          .catch(error => {
            console.error('文件上传失败:', error);
            this.$message.error('文件上传失败，请重试');
          });
    },
    resetFormDocumentForm() {
      this.formDocumentForm = {
        id: '',
        create_time: '',
        update_time: '',
        creator: this.useName,
        process_status: '',
        sys_update_user: '',
        sys_audit_user: '',
        sys_audit_time: '',
        sys_deleted: '',
        number: '',
        name: '',
        name_english: '',
        name_russian: '',
        version_number: '',
        upload_person: this.useName,
        upload_time: '',
        revise_time: '',
        document_path: ''
      };
    },
    handleRemoveForm(file, fileList) {
      // 文件移除处理
      this.fileList = fileList;
    },
    beforeRemoveForm(file, fileList) {
      console.log(fileList)
      return this.$confirm(`确定移除 ${file.name}？`);
    },
    handleExceedForm(files, fileList) {
      this.$message.warning(`当前限制选择 1 个文件，本次选择了 ${files.length} 个文件，共选择了 ${files.length + fileList.length} 个文件`);
    },
    handlePreviewForm(file) {
      // 文件预览处理
      console.log(file);
    },
    handleFileChangeForm(file, fileList) {
      this.currentFileForm = file;
      this.fileListForm = fileList.slice(-1); // 只保留最新文件
    },
    beforeUploadForm(file) {
      const isLt10M = file.size / 1024 / 1024 < 10;

      if (!isLt10M) {
        this.$message.error('文件大小不能超过10MB!');
      }

      return isLt10M;
    },
    submitUploadForm() {
      this.$refs.formDocumentFormRef.validate(valid => {
        if (valid && this.currentFileForm) {
          this.saveFileForm(this.currentFileForm);
        } else {
          this.$message.warning('请填写完整表单并上传文件');
        }
      });
    },

    // 显示编辑弹窗
    showEditFormDialog(scope) {
      this.currentEditRowForm = scope.row;
      this.editFormDocumentForm = _.cloneDeep(scope.row);
      this.editFormDialog = true;
      this.editFileListForm = [];
      this.editCurrentFileForm = null;
    },
    // 处理编辑文件变化（点击替换表单）
    handleEditFileChangeForm(file, fileList) {
      this.editCurrentFileForm = file;
      this.editFileListForm = fileList.slice(-1);
      //1.新生成一个文件名称,并且把文件名称的后缀添加上
      let fileName=this.generateUniqueId()+'.'+file.name.split('.')[file.name.split('.').length-1]
      //把新的文件名称放进去
      this.editCurrentFileForm.name=fileName
    },
    // 提交编辑
    submitEditUploadForm() {
      this.$refs.editFormDocumentFormRef.validate(valid => {
        if (valid) {
          if (this.editCurrentFileForm) {
            // 如果有新文件，先上传文件
            this.updateDocumentWithFileForm();
          } else {
            // 如果没有新文件，只更新信息
            this.updateDocumentInfoForm(this.editFormDocumentForm);
          }
        } else {
          this.$message.warning('请填写完整表单');
        }
      });
    },
    // 更新文档信息（不替换表单）
    updateDocumentInfoForm(editFormDocumentForm) {
      this.$request.post('/updateFormDocumentToExamineProblem', editFormDocumentForm)
          .then(result => {
            if (result.code === 401) {
              this.$router.push('UserLogin');
              this.$message.warning("您未登录，请登录");
            } else {
              this.$message.success('表单信息更新成功');
              this.queryFormDocumentAll().then(() => {
                this.editFormDialog = false;
              });
            }
          })
          .catch(error => {
            console.error('更新表单信息失败:', error);
            this.$message.error('更新表单信息失败');
          });
    },
    // 更新表单并替换表单
    updateDocumentWithFileForm() {
      const formData = new FormData();
      formData.append('file', this.editCurrentFileForm.raw);
      formData.append('id', this.editFormDocumentForm.id);
      formData.append('number', this.editFormDocumentForm.number);
      formData.append('name', this.editFormDocumentForm.name);
      formData.append('name_english', this.editFormDocumentForm.name_english);
      formData.append('name_russian', this.editFormDocumentForm.name_russian);
      formData.append('version_number', this.editFormDocumentForm.version_number);
      formData.append('document_path', this.editFormDocumentForm.document_path);
      formData.append('document_path_new', this.editCurrentFileForm.name);

      this.$requestFile.post('/updateFormDocumentWithFileToExamineProblem', formData)
          .then(result => {
            if (result.code === 401) {
              this.$router.push('UserLogin');
              this.$message.warning("您未登录，请登录");
            } else {
              this.$message.success('表单更新成功');
              this.queryFormDocumentAll().then(() => {
                this.editFormDialog = false;
              });
            }
          })
          .catch(error => {
            console.error('表单更新失败:', error);
            this.$message.error('表单更新失败');
          });
    },

    //查询所有pdf文件
    async queryFormDocumentAll() {
      try {
        const result = await this.$request.post('/queryFormDocumentAllToExamineProblem');
        if (result.code === 401) {
          this.$router.push('UserLogin');
          this.$message.warning("您未登录，请登录");
        } else {
          this.originalFormDocumentData = result.data
          this.formDocumentData = result.data;
        }
        return result; // 返回结果以便链式调用
      } catch (error) {
        console.error('查询表单列表失败:', error);
        this.$message.error('获取表单列表失败');
        throw error;
      }
    },

    //——————————————————————————————————————体系文件——————————————————————————————————————
    handleRemoveDocx(file, fileList) {
      // 文件移除处理
      this.fileList = fileList;
    },
    beforeRemoveDocx(file, fileList) {
      console.log(fileList)
      return this.$confirm(`确定移除 ${file.name}？`);
    },
    handleExceedDocx(files, fileList) {
      this.$message.warning(`当前限制选择 1 个文件，本次选择了 ${files.length} 个文件，共选择了 ${files.length + fileList.length} 个文件`);
    },
    handlePreviewDocx(file) {
      // 文件预览处理
      console.log(file);
    },
    handleFileChangeDocx(file, fileList) {
      console.log(file)
      this.currentFileDocx = file;
      this.fileListDocx = fileList.slice(-1); // 只保留最新文件
      const formData = new FormData();
      formData.append('file', file.raw)
      formData.append('fileName',file.name)
      this.$requestFile.post('/addDocxDocumentToExamineProblem',formData).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin');
          this.$message.warning("您未登录，请登录");
        }
        else{
          this.$message.success("文件上传成功")
          console.log(result.data)
        }
      })
    },
    beforeUploadDocx(file) {
      const isDOCX = file.type === 'application/docx';
      const isLt10M = file.size / 1024 / 1024 < 10;

      if (!isDOCX) {
        this.$message.error('只能上传DOCX格式的文件!');
      }
      if (!isLt10M) {
        this.$message.error('文件大小不能超过10MB!');
      }

      return isDOCX && isLt10M;
    },

    //——————————————————————————————————————标准作业监察——————————————————————————————————————
    //添加项目的提示文字描述
    standardWorkSuperviseEditShow(doe, scope) {
      this.standardWorkSuperviseDoe = doe
      this.standardWorkSuperviseScope = scope
      //用户要新增一条监察记录
      if (doe === 1) {
        this.titleUse = '您正在添加一条项目'
        this.standardWorkSuperviseForm = {
          //主键
          id: '',
          //创建时间
          create_time: '',
          //更新时间
          update_time: '',
          //创建人
          creator: '',
          //流程状态
          process_status: '',
          //更新人
          sys_update_user: '',
          //审核人
          sys_audit_user: '',
          //审核时间
          sys_audit_time: '',
          //逻辑删除
          sys_deleted: 0,
          //审核项目
          project: '',
          //审核要求
          require: '',
          //被审核工序
          op: '',
          //车间名称
          workshop: '',
          //线体名称
          line: '',
          //自有编辑人
          editor: '',
          //自有创建时间
          establishTime: '',
          //自有更新时间
          updateTime: '',
          //审核项目_英语
          project_english: '',
          //审核项目_俄语
          project_russian: '',
          //审核要求_英语
          require_english: '',
          //审核要求_俄语
          require_russian: '',
        }
        this.standardWorkSuperviseDialog = true
      }
      if (doe === 2) {
        this.standardWorkSuperviseForm = _.cloneDeep(scope.row)
        this.standardWorkSuperviseDialog = true
      }
    },
    //如果填写内容为空，会报警提示
    standardWorkSuperviseEditOk() {
      if (this.standardWorkSuperviseForm.workshop === '' || this.standardWorkSuperviseForm.workshop === undefined || this.standardWorkSuperviseForm.workshop === null) {
        this.$message.error('请选择车间')
        return
      }
      if (this.standardWorkSuperviseForm.line === '' || this.standardWorkSuperviseForm.line === undefined || this.standardWorkSuperviseForm.line === null) {
        this.$message.error('请选择线体')
        return
      }
      if (this.standardWorkSuperviseForm.op === '' || this.standardWorkSuperviseForm.op === undefined || this.standardWorkSuperviseForm.op === null) {
        this.$message.error('请选择工序')
        return
      }
      if (this.standardWorkSuperviseForm.project === '' || this.standardWorkSuperviseForm.project === undefined || this.standardWorkSuperviseForm.project === null) {
        this.$message.error('请填写项目内容')
        return
      }
      if (this.standardWorkSuperviseForm.project_english === '' || this.standardWorkSuperviseForm.project_english === undefined || this.standardWorkSuperviseForm.project_english === null) {
        this.$message.error('Please fill in the project content')
        return
      }
      if (this.standardWorkSuperviseForm.project_russian === '' || this.standardWorkSuperviseForm.project_russian === undefined || this.standardWorkSuperviseForm.project_russian === null) {
        this.$message.error('Заполните содержание проверочного пункта')
        return
      }
      if (this.standardWorkSuperviseForm.require === '' || this.standardWorkSuperviseForm.require === undefined || this.standardWorkSuperviseForm.require === null) {
        this.$message.error('请填写审核要求的内容')
        return
      }
      if (this.standardWorkSuperviseForm.require_english === '' || this.standardWorkSuperviseForm.require_english === undefined || this.standardWorkSuperviseForm.require_english === null) {
        this.$message.error('Please fill in the content of the review requirements')
        return
      }
      if (this.standardWorkSuperviseForm.require_russian === '' || this.standardWorkSuperviseForm.require_russian === undefined || this.standardWorkSuperviseForm.require_russian === null) {
        this.$message.error('Заполните содержание требований проверки')
        return
      }

      this.standardWorkSuperviseForm.editor = this.useName + '/' + this.useId
      //
      if (this.standardWorkSuperviseDoe === 1) {
        //向后端发送数据
        this.$request.post('/insertOneStandardWorkSuperviseToExamineProblem', this.standardWorkSuperviseForm).then(result => {
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          } else {
            this.$message.success(result.data)
            this.inquiryAllStandardWorkSupervise()
          }
        })
        this.standardWorkSuperviseDialog = false
      }
      //修改数据后
      else if (this.standardWorkSuperviseDoe === 2) {
        //向后端发送数据
        this.$request.post('/editOneByIdStandardWorkSuperviseToExamineProblem', this.standardWorkSuperviseForm).then(result => {
          //如果页面显示“401”，实际为“未登录状态”，页面不允许在继续操作，返回登录提醒
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          } else {
            this.$message.success(result.data)
            //修改内容后，页面直接调用一遍改过的数据，并把数据实时显示出来，不用刷新再出来
            this.standardWorkSuperviseData.splice(this.standardWorkSuperviseScope.$index, 1, this.standardWorkSuperviseForm)
            this.standardWorkSuperviseDialog = false //弹窗点击确定后直接隐藏，把页面显示出来
          }
        })
      }
    },
    //读取所有的监察表内容
    inquiryAllStandardWorkSupervise() {
      this.$request.post('/inquiryAllStandardWorkSuperviseToExamineProblem').then(result => {
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        } else {
          this.standardWorkSuperviseData = result.data
        }
      })
    },

    //添加筛选方法
    filterWorkshop(value, row) {
      let workshopName = row.workshop;
      if (row.workshop.split('/').length === 3) {
        workshopName = this.languageS === 'chinese' ? row.workshop.split('/')[0] :
            this.languageS === 'english' ? row.workshop.split('/')[1] :
                row.workshop.split('/')[2];
      }
      return workshopName.includes(value);
    },
    filterLine(value, row) {
      let lineName = row.line;
      if (row.line.split('/').length === 3) {
        lineName = this.languageS === 'chinese' ? row.line.split('/')[0] :
            this.languageS === 'english' ? row.line.split('/')[1] :
                row.line.split('/')[2];
      }
      return lineName.includes(value);
    },
    //添加重置筛选的方法
    clearFilters() {
      this.$refs.table.clearFilter();
    },

    //——————————————————————————————————————标准块——————————————————————————————————————
    //新增或编辑一条审核问题
    standardModuleEditShow(doe,scope){
      this.standardModuleDoe=doe
      this.standardModuleScope=scope
      if (doe===1){
        if (this.languageS==='chinese'){
          this.titleUse='您正在插入一条审核块'
        }
        else if (this.languageS==='english'){
          this.titleUse='You are inserting one line of standard module'
        }
        else if (this.languageS==='russian'){
          this.titleUse='Вы вставляете одну строку cтандартный блок'
        }
        //对表单变量赋值，给一个空的
        this.standardModuleForm={
          //唯一标识，低代码的主键
          id:this.generateUUIDv4(),
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:this.useId+'/'+this.useName,
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:0,

          //标准块名称
          standard_module_name: '',
          //审核环节
          audit_link: '',
          //审核项目
          audit_project: '',
          //审核要求
          audit_requirement: '',
          //审核指导书
          audit_instruction: '请编辑|*|请编辑|*|请编辑|%|请编辑关注点|*|请编辑关注点|*|请编辑关注点|%|0|%||%||%||%||%|',
          //问题等级
          problem_level: '',
          //用时
          time: '',
          //责任科室
          section: '',
          //关联文件1
          related_document1: '',
          //关联文件2
          related_document2: '',
          //关联文件3
          related_document3: '',
          //IFTA条款
          iFTA_clause: '',
          //公司体系文件关联
          system_document_association: ''
        }
        this.resetLanguageFields()
        //控制弹窗打开
        this.standardModuleDialog=true
      }
      if (doe === 2) {
        if (this.languageS==='chinese'){
          this.titleUse='您正在编辑一条审核块'
        }
        else if (this.languageS==='english'){
          this.titleUse='You are editing one line of standard module'
        }
        else if (this.languageS==='russian'){
          this.titleUse='Вы редактируете одну строку cтандартный блок'
        }
        this.standardModuleForm = _.cloneDeep(scope.row)
        // 将组合字段拆分开来填充到输入框
        this.splitLanguageFields(scope.row)

        this.standardModuleDialog = true
      }
    },
    //向后端保存新增结果
    standardModuleOk() {
      // 在提交前组合多语言字段
      this.standardModuleForm.standard_module_name = this.standard_module_name_chinese + "/" + this.standard_module_name_english + "/" + this.standard_module_name_russian;
      this.standardModuleForm.audit_project = this.audit_project_chinese + "/" + this.audit_project_english + "/" + this.audit_project_russian;
      this.standardModuleForm.audit_requirement = this.audit_requirement_chinese + "/" + this.audit_requirement_english + "/" + this.audit_requirement_russian;
      //数据校验
      // if (this.toExamineProblemForm.auditor === '' || this.toExamineProblemForm.auditor === undefined || this.toExamineProblemForm.auditor === null) {
      //   this.$message.error('请填写问题审核人/Fill in Auditor/Заполнить Аудитор')
      //   return
      // }
      // if (this.toExamineProblemForm.department === '' || this.toExamineProblemForm.department === undefined || this.toExamineProblemForm.department === null) {
      //   this.$message.error('请选择责任部门/Select Department/Выбрать Департамент')
      //   return
      // }
      //新增一条
      if (this.standardModuleDoe === 1) {
        //向后端发送数据
        this.$request.post('/insertOneStandardModuleToExamineProblem', this.standardModuleForm).then(result => {
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          } else {
            this.$message.success("插入成功")
            this.standardModuleData.push(_.cloneDeep(this.standardModuleForm))
            // 重置输入框
            this.resetLanguageFields();
          }
        })
        this.standardModuleDialog = false
      }
      //编辑一条审核问题
      else if (this.standardModuleDoe === 2) {
        //向后端发送数据
        this.$request.post('/editStandardModuleToExamineProblem', this.standardModuleForm).then(result => {
          //如果页面显示“401”，实际为“未登录状态”，页面不允许在继续操作，返回登录提醒
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          } else {
            this.$message.success(result.data)
            //修改内容后，页面直接调用一遍改过的数据，并把数据实时显示出来，不用刷新再出来
            this.standardModuleData.splice(this.standardModuleScope.$index, 1, _.cloneDeep(this.standardModuleForm))
            this.standardModuleDialog = false
          }
        })
      }
    },

    // 重置语言输入框
    resetLanguageFields() {
      this.standard_module_name_chinese = ''
      this.standard_module_name_english = ''
      this.standard_module_name_russian = ''
      this.audit_project_chinese = ''
      this.audit_project_english = ''
      this.audit_project_russian = ''
      this.audit_requirement_chinese = ''
      this.audit_requirement_english = ''
      this.audit_requirement_russian = ''
    },
    // 拆分组合字段到各个语言输入框
    splitLanguageFields(row) {
      // 拆分标准块名称
      if (row.standard_module_name && row.standard_module_name.split('/').length === 3) {
        const [chinese, english, russian] = row.standard_module_name.split('/')
        this.standard_module_name_chinese = chinese
        this.standard_module_name_english = english
        this.standard_module_name_russian = russian
      }
      // 拆分审核项目
      if (row.audit_project && row.audit_project.split('/').length === 3) {
        const [chinese, english, russian] = row.audit_project.split('/')
        this.audit_project_chinese = chinese
        this.audit_project_english = english
        this.audit_project_russian = russian
      }
      // 拆分审核要求
      if (row.audit_requirement && row.audit_requirement.split('/').length === 3) {
        const [chinese, english, russian] = row.audit_requirement.split('/')
        this.audit_requirement_chinese = chinese
        this.audit_requirement_english = english
        this.audit_requirement_russian = russian
      }
    },

    //辅助函数：查询审核问题的当前页数据
    async queryStandardModuleWithPagination() {
      const { currentPage, pageSize } = this.standardModulePagination;
      const response = await this.$request.post('/queryStandardModulePaginationToExamineProblem', {
        page: currentPage-1,
        size: pageSize,
      });
      if (response.code === 401) {
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      else {
        for (let i = 0; i < response.data.length; i++) {
          response.data[i].indexUse=(this.standardModulePagination.currentPage-1)*this.standardModulePagination.pageSize+1+i
        }
        return response.data
      }
    },
    //辅助函数：查询工审核问题条目总数
    async queryStandardModuleQuantity(){
      const response = await this.$request.post('/queryStandardModuleQuantityToExamineProblem');
      if (response.code === 401){
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      else{
        return response.data
      }
    },
    //处理每页显示条数的变化
    handleSizeChangeStandardModule(val) {
      this.standardModulePagination.pageSize = val;
      this.queryStandardModuleWithPagination().then(data=>{
        this.standardModuleData=data
      });
    },
    //处理选择哪页的变化
    handleCurrentChangeStandardModule(val) {
      this.standardModulePagination.currentPage = val;
      this.queryStandardModuleWithPagination().then(data=>{
        this.standardModuleData=data
      });
    },

    //显示编辑审核块指导书的弹窗
    instructionEditShow(doe,scope){
      //默认显示要领书/指导书
      this.workBookHeard1='#0269fa'
      this.workBookHeardColour1='white'
      this.workBookHeard2=''
      this.workBookHeardColour2=''
      this.workBookHeardUse=1
      //清空走马灯图片及视频列表
      this.itemView=[]
      this.itemViewVideo=[]
      this.standardModuleDoe=doe
      this.standardModuleScope=scope
      if (doe===1){
        if (this.languageS==='chinese'){
          this.titleUse='您正在编辑指导书内容'
        }
        else if (this.languageS==='english'){
          this.titleUse='You are editing the content of the instruction'
        }
        else if (this.languageS==='russian'){
          this.titleUse='Вы редактируете содержание инструкции'
        }
        //组合作业指导书数据
        let instruction=scope.row.audit_instruction.split('|-|')
        this.workBook=[]
        for (let i = 0; i < instruction.length; i++) {
          let itemlist=instruction[i].split('|%|')
          let item={
            id:i+1,
            work:itemlist[0],//工作步骤
            problem:itemlist[1],//关注点
            spendTime:itemlist[2],//需要时间
            pictureList:itemlist[3],//图片列表
            videoList:itemlist[4],//视频列表
            reserve1:itemlist[5],//预留
            reserve2:itemlist[6],//预留
            reserve3:itemlist[7],//预留
          }
          this.workBook.push(item)
        }
        //控制弹窗打开
        this.instructionDialog=true
      }
    },
    //单击作业指导书上的行的反应
    workBookRowClick(row){
      this.workBookRow=row
      //清空数据
      this.itemViewVideo=[]
      this.itemView=[]
      //组合走马灯图片
      if (row.pictureList===null || row.pictureList==='' || row.pictureList===undefined){
        this.itemView=[]
      }
      else {
        let pictureTemp=row.pictureList.split('|*|')
        this.itemView=[]
        for (let i = 0; i < pictureTemp.length; i++) {
          let temp=filepath+pictureTemp[i]
          this.itemView.push(temp)
        }
      }
      //组合走马灯的视频
      if (row.videoList===null || row.videoList==='' || row.videoList===undefined){
        this.itemViewVideo=[]
      }
      else {
        let pictureTemp=row.videoList.split('|*|')
        this.itemViewVideo=[]
        for (let i = 0; i < pictureTemp.length; i++) {
          let temp=filepath+pictureTemp[i]
          this.itemViewVideo.push(temp)
        }
      }
    },
    //用户点击作业指导书中的行，改变背景颜色
    workBookRowClassName(row){
      // 如果当前行是currentRow，则返回特定的样式
      if (this.workBookRow && this.workBookRow === row.row) {
        return {
          backgroundColor: 'lightgray', // 灰色背景
          color: 'blue' // 蓝色文字
        };
      }
      return {}; // 否则不应用任何样式
    },
    //切换照片和视频的函数
    switchVideo(doe){
      //doe=1,显示图片，doe=2，显示视频
      this.switchVideoUse=doe

      if (doe===1){
        this.videoAndImage1='#0269fa'
        this.videoAndImageColor1='white'

        this.videoAndImage2='white'
        this.videoAndImageColor2=''

        this.videoAndImage3='white'
        this.videoAndImageColor3=''
      }
      else if (doe===2){
        this.videoAndImage1='white'
        this.videoAndImageColor1=''

        this.videoAndImage2='#0269fa'
        this.videoAndImageColor2='white'

        this.videoAndImage3='white'
        this.videoAndImageColor3=''
      }
      else if (doe===3){
        this.videoAndImage1='white'
        this.videoAndImageColor1=''

        this.videoAndImage2='white'
        this.videoAndImageColor2=''

        this.videoAndImage3='#0269fa'
        this.videoAndImageColor3='white'
      }
    },

    //用户点击的是看作业指导书中的哪个数据，表头的上面的列表切换。
    workBookHeard(doe){
      this.workBookHeardUse=doe
      //图片、视频展示清空
      this.itemView=[]
      this.itemViewVideo=[]
      if (doe===1){
        this.workBookHeard1='#0269fa'
        this.workBookHeardColour1='white'

        this.workBookHeard2=''
        this.workBookHeardColour2=''

        this.workBookHeard3=''
        this.workBookHeardColour3=''

        this.workBookHeard4=''
        this.workBookHeardColour4=''
      }
      else if (doe===2){
        this.workBookHeard1=''
        this.workBookHeardColour1=''

        this.workBookHeard2='#0269fa'
        this.workBookHeardColour2='white'
        //画工时直方图
        this.initChart()
      }
    },
    //编辑作业指导书用到的
    editWorkBookShow(doe,scope){
      //把用户选择的是那个操作传递出去
      this.workBookDoe=doe
      //把点击的数据传递出去，是scope格式的
      this.workBookScope=scope
      //向上插入一条指导书内容
      if (doe===1){
        if (this.languageS==='chinese'){
          this.titleUse='您正在向上插入一条指导书内容'
        }
        else if (this.languageS==='english'){
          this.titleUse='You are inserting an instruction content upwards'
        }
        else if (this.languageS==='russian'){
          this.titleUse='Вы вставляете содержание инструкции вверх'
        }
        // 初始化关注点的富文本编辑器
        let chinesePoints = '';
        let englishPoints = '';
        let russianPoints = '';
        // 解析现有的关注点数据
        if (this.workBook.problem!=='' && this.workBook.problem !== null && this.workBook.problem !== undefined) {
          const tempPoints = this.workBook.problem.split('|*|');
          chinesePoints = tempPoints[0] || '';
          englishPoints = tempPoints[1] || '';
          russianPoints = tempPoints[2] || '';
        }
        this.workBookForm={}
        this.stepEditDialog=true
        // 使用 $nextTick 确保 DOM 已经渲染
        this.$nextTick(() => {
          this.initEditor('pointsChineseEditor', 'pointsChineseEditor', chinesePoints);
          this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', englishPoints);
          this.initEditor('pointsRussianEditor', 'pointsRussianEditor', russianPoints);
        });
      }
      //向下插入一条指导书内容
      else if (doe===2){
        if (this.languageS==='chinese'){
          this.titleUse='您正在向下插入一条指导书内容'
        }
        else if (this.languageS==='english'){
          this.titleUse='You are inserting an instruction content downwards'
        }
        else if (this.languageS==='russian'){
          this.titleUse='Вы вставляете содержание инструкции вниз'
        }
        // 初始化关注点的富文本编辑器
        let chinesePoints = '';
        let englishPoints = '';
        let russianPoints = '';
        // 解析现有的关注点数据
        if (this.workBook.problem!=='' && this.workBook.problem !== null && this.workBook.problem !== undefined) {
          const tempPoints = this.workBook.problem.split('|*|');
          chinesePoints = tempPoints[0] || '';
          englishPoints = tempPoints[1] || '';
          russianPoints = tempPoints[2] || '';
        }
        this.workBookForm={}
        this.stepEditDialog=true
        // 使用 $nextTick 确保 DOM 已经渲染
        this.$nextTick(() => {
          this.initEditor('pointsChineseEditor', 'pointsChineseEditor', chinesePoints);
          this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', englishPoints);
          this.initEditor('pointsRussianEditor', 'pointsRussianEditor', russianPoints);
        });
      }
      //编辑一条指导书内容
      else if (doe===3){
        console.log("daozhele")
        if (this.languageS==='chinese'){
          this.titleUse='您正在编辑一条指导书内容'
        }
        else if (this.languageS==='english'){
          this.titleUse='You are editing an instruction content'
        }
        else if (this.languageS==='russian'){
          this.titleUse='Вы редактируете содержание инструкции'
        }
        // 初始化关注点的富文本编辑器
        let chinesePoints = '';
        let englishPoints = '';
        let russianPoints = '';
        // 解析现有的关注点数据
        if (this.workBook.problem!=='' && this.workBook.problem !== null && this.workBook.problem !== undefined) {
          const tempPoints = this.workBook.problem.split('|*|');
          chinesePoints = tempPoints[0] || '';
          englishPoints = tempPoints[1] || '';
          russianPoints = tempPoints[2] || '';
        }
        this.workBookForm=this.workBookScope.row
        this.inputText1=this.workBookForm.work.split("|*|")[0]
        this.inputText2=this.workBookForm.work.split("|*|")[1]
        this.inputText3=this.workBookForm.work.split("|*|")[2]

        this.inputNum=this.workBookForm.spendTime
        this.stepEditDialog=true
        // 使用 $nextTick 确保 DOM 已经渲染
        this.$nextTick(() => {
          this.initEditor('pointsChineseEditor', 'pointsChineseEditor', chinesePoints);
          this.initEditor('pointsEnglishEditor', 'pointsEnglishEditor', englishPoints);
          this.initEditor('pointsRussianEditor', 'pointsRussianEditor', russianPoints);
          this.pointsChineseEditor.txt.html(this.workBookForm.problem.split("|*|")[0])
          this.pointsEnglishEditor.txt.html(this.workBookForm.problem.split("|*|")[1])
          this.pointsRussianEditor.txt.html(this.workBookForm.problem.split("|*|")[2])
        });
      }
      //删除一条指导书内容
      else if (doe===6){
        console.log("daozhele")
        if (this.languageS==='chinese'){
          this.titleUse='您正在删除一条指导书内容'
        }
        else if (this.languageS==='english'){
          this.titleUse='You are deleting an instruction content upwards'
        }
        else if (this.languageS==='russian'){
          this.titleUse='Вы удаляете содержание инструкции вверх'
        }
        this.deleteDialog=true
        this.deleteTableName="deleteWorkBookStandardModule"
      }
      //编辑一条指导书内容的图片
      else if (doe===4){
        this.isImageFile=1
        if (this.languageS==='chinese'){
          this.titleUse='您正在编辑指导书图片'
        }
        else if (this.languageS==='english'){
          this.titleUse='You are editing the picture of the instruction'
        }
        else if (this.languageS==='russian'){
          this.titleUse='Вы редактируете изображение инструкции'
        }
        this.workBookForm=scope.row
        //组合图片列表
        this.pictureFileList=[]
        if (this.workBookScope.row.pictureList!==null && this.workBookScope.row.pictureList!=='' && this.workBookScope.row.pictureList!==undefined){
          const temp = this.workBookScope.row.pictureList.split('|*|')
          for (let i = 0; i < temp.length; i++) {
            let temp2 = {
              name: temp[i],
              percentage: 0,
              raw: File,
              size: 0,
              status: null,
              uid: null,
              url: filepath + temp[i]
            }
            this.pictureFileList.push(temp2)
          }
        }
        this.dialogPicture=true
      }
      //编辑一条指导书内容的视频
      else if (doe===5){
        this.isImageFile=2
        if (this.languageS==='chinese'){
          this.titleUse='您正在编辑指导书视频'
        }
        else if (this.languageS==='english'){
          this.titleUse='You are editing the video of the instruction'
        }
        else if (this.languageS==='russian'){
          this.titleUse='Вы редактируете видео инструкции'
        }
        this.workBookForm=scope.row
        //组合图片列表
        this.videoList=[]
        if (this.workBookScope.row.videoList!==null && this.workBookScope.row.videoList!=='' && this.workBookScope.row.videoList!==undefined){
          const temp = this.workBookScope.row.videoList.split('|*|')
          for (let i = 0; i < temp.length; i++) {
            let temp2 = {
              name: temp[i],
              percentage: 0,
              raw: File,
              size: 0,
              status: null,
              uid: null,
              url: filepath + temp[i]
            }
            this.videoList.push(temp2)
          }
        }
        this.loading=false
        this.dialogVideo=true
      }
    },
    //编辑作业指导书的打包函数，是把作业指导书中所有的信息写入到同一个字段中的操作（编辑、删除、增加、增加图片、增加录像都有）
    editWorkBookOk(){
      //判断是否设置了作业时间长度，如果没有，将强制输入
      if (this.inputNum==='' || this.inputNum===0){
        alert("工步时长未设置，请设置后提交")
        return ''; // 返回空字符串或错误信息
      }
      // 判断用户输入的数据是否为空,并组合新数据，如果没有默认输入
      if (this.inputText1===''){
        this.inputText1='请编辑步骤'
      }
      if (this.inputText2===''){
        this.inputText2='Please edit the step'
      }
      if (this.inputText3===''){
        this.inputText3='Пожалуйста, редактируйте шаг'
      }
      if (this.pointsChineseEditor===''){
        this.pointsChineseEditor='请编辑关注点'
      }
      if (this.pointsChineseEditor===''){
        this.pointsChineseEditor='Please edit the focus points'
      }
      if (this.pointsChineseEditor===''){
        this.pointsChineseEditor='Пожалуйста, редактируйте точку внимания'
      }
      //建一个临时变量，在组合数据中使用
      let temp=_.cloneDeep(this.workBook)
      //向上插入
      if (this.workBookDoe===1){
        this.workBookForm={
          id:null,
          work:this.inputText1+'|*|'+this.inputText2+'|*|'+this.inputText3,
          problem:this.pointsChineseEditor.txt.html()+'|*|'+this.pointsEnglishEditor.txt.html()+'|*|'+this.pointsRussianEditor.txt.html(),
          spendTime:this.inputNum,//需要时间
          pictureList:'',//图片列表
          videoList:'',//视频列表
          reserve1:'',
          reserve2:'',
          reserve3:''
        }
        temp.splice(this.workBookScope.$index,0,this.workBookForm)
      }
      //向下插入
      else if (this.workBookDoe===2){
        this.workBookForm={
          id:null,
          work:this.inputText1+'|*|'+this.inputText2+'|*|'+this.inputText3,
          problem:this.pointsChineseEditor.txt.html()+'|*|'+this.pointsEnglishEditor.txt.html()+'|*|'+this.pointsRussianEditor.txt.html(),
          spendTime:this.inputNum,//需要时间
          pictureList:'',//图片列表
          videoList:'',//视频列表
          reserve1:'',
          reserve2:'',
          reserve3:''
        }
        temp.splice(this.workBookScope.$index+1,0,this.workBookForm)
      }
      //编辑
      else if (this.workBookDoe===3){
        this.workBookForm={
          id:this.workBookScope.row.id,
          work:this.inputText1+'|*|'+this.inputText2+'|*|'+this.inputText3,
          problem:this.pointsChineseEditor.txt.html()+'|*|'+this.pointsEnglishEditor.txt.html()+'|*|'+this.pointsRussianEditor.txt.html(),
          spendTime:this.inputNum,//需要时间
          pictureList:'',//图片列表
          videoList:'',//视频列表
          reserve1:'',
          reserve2:'',
          reserve3:''
        }
        temp.splice(this.workBookScope.$index,1,this.workBookForm)
      }
      //组合成文本数据
      /*组合作业指导书的内容   注：|*|：是分割语言的；
                                       |%|：是分割每一行中的字段的，具体为:
                                       work:工作步骤|%|
                                       problem:注意点说明|%|
                                       spendTime:需要时间|%|
                                       pictureList:图片列表|%|
                                       videoList:视频列表|%|
                                       |-|分割每一行的
                                       */
      let strTemp=''
      for (let i = 0; i < temp.length; i++) {
        //如果只有一行步骤内容
        if (i===0){
          strTemp=temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+temp[i].reserve1+'|%|'+temp[i].reserve2+'|%|'+temp[i].reserve3
        }
        else {
          strTemp=strTemp+'|-|'+temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+temp[i].reserve1+'|%|'+temp[i].reserve2+'|%|'+temp[i].reserve3
        }
      }
      //向后端修改数据
      this.editByOneField(this.standardModuleScope.row.id,'audit_instruction',strTemp).then(()=>{
        if (this.workBookDoe===1){
          //修改workBook中的内容
          this.workBook.splice(this.workBookScope.$index,0,this.workBookForm)
        }
        else if (this.workBookDoe===2){
          //修改workBook中的内容
          this.workBook.splice(this.workBookScope.$index+1,0,this.workBookForm)
        }
        else if (this.workBookDoe===3){
          //修改workBook中的内容
          this.workBook.splice(this.workBookScope.$index,1,this.workBookForm)
        }
        //重新排布workBook的id
        for (let i = 0; i < this.workBook.length; i++) {
          this.workBook[i].id=i+1
        }
        //修改大表数据
        this.standardModuleData[this.standardModuleScope.$index].audit_instruction=strTemp
        //修改scope里的内容
        this.standardModuleScope.row.audit_instruction=strTemp
        this.stepEditDialog=false
      })

    },
    //根据一个字段名修改内容
    async editByOneField(id,fieldName,fieldValue){
      this.$request.post("/editByOneFieldToExamineProblem", {
        id:id,
        fieldName:fieldName,
        fieldValue:fieldValue
      }).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin');
          alert("您未登录，请登录");
        }
        else{
          this.$message.success("修改成功")
        }
      })
    },

    //编辑指导书的图片
    saveFileAnnex1(file, fileList1){
      this.pictureFileList=fileList1
      console.log(fileList1,"添加")
      //1.新生成一个文件名称,并且把文件名称的后缀添加上
      let fileName=file.name.split('.')[0]+"-"+this.generateUniqueId()+'.'+file.name.split('.')[file.name.split('.').length-1]
      file.name=fileName
      fileList1[fileList1.length-1].name=fileName
      const formData = new FormData();
      //把文件、id、字段名传出去
      formData.append('file',file.raw)
      formData.append('id',this.standardModuleScope.row.id)
      formData.append('fieldName','audit_instruction')
      formData.append('fileName',fileName)
      let strFileName=''
      for (let i = 0; i < fileList1.length; i++) {
        if (i===0){
          strFileName=fileList1[i].name
        }
        else {
          strFileName=strFileName+'|*|'+fileList1[i].name
        }
      }
      //把文件名给编辑指导书这一行图片的字段
      this.workBookForm.pictureList=strFileName
      //组合作业指导书的长字符串
      /*组合作业指导书的内容   注：|*|：是分割语言的；
                                       |%|：是分割每一行中的字段的，具体为:
                                       work:工作步骤|%|
                                       problem:注意点说明|%|
                                       spendTime:需要时间|%|
                                       pictureList:图片列表|%|
                                       videoList:视频列表|%|
                                       |-|分割每一行的
                                       */
      //建一个临时变量，在组合数据中使用
      let temp=_.cloneDeep(this.workBook)
      let strTemp=''
      for (let i = 0; i < temp.length; i++) {
        //如果只有一行步骤内容
        if (i===0){
          strTemp=temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+temp[i].reserve1+'|%|'+temp[i].reserve2+'|%|'+temp[i].reserve3
        }
        else {
          strTemp=strTemp+'|-|'+temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+temp[i].reserve1+'|%|'+temp[i].reserve2+'|%|'+temp[i].reserve3
        }
      }
      //把组合好的图片名以字符串形式给到后端
      formData.append('fieldValue',strTemp)
      console.log(this.workBookForm)
      // console.log(formData)
      console.log(fileList1)
      this.$requestFile.post('/editInstructionFileToExamineProblem', formData).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }
        else{
          //修改大表数据
          this.standardModuleData[this.standardModuleScope.$index].audit_instruction=result.data
          //修改scope里的内容
          this.standardModuleScope.row.audit_instruction=result.data
          //修改作业指导书列表中的内容
          this.workBook[this.workBookScope.$index].pictureList=strFileName
          //修改弹窗中的走马灯,组合走马灯的图片
          if (strFileName===null || strFileName==='' || strFileName===undefined){
            this.itemView=[]
          }
          else {
            let pictureTemp=strFileName.split('|*|')
            this.itemView=[]
            for (let i = 0; i < pictureTemp.length; i++) {
              let temp=filepath+pictureTemp[i]
              this.itemView.push(temp)
            }
          }
        }
      })
    },
    //删除指导书的图片
    handleRemovePicture1(file) {
      //对图片列表中的信息进行整合
      const index = this.pictureFileList.findIndex(item => item.name === file.name);
      this.pictureFileList.splice(index,1)
      //拼接数据表中存储文件名的字段
      let problemPhotoName=''
      console.log(this.pictureFileList,"删除")
      for (let i = 0; i < this.pictureFileList.length; i++) {
        if (i===0){
          problemPhotoName = this.pictureFileList[i].name
        }
        else {
          problemPhotoName = problemPhotoName+"|*|"+this.pictureFileList[i].name
        }
      }
      //组合作业指导书
      //建一个临时变量，在组合数据中使用
      let temp=_.cloneDeep(this.workBook)
      temp[this.workBookScope.$index].pictureList=problemPhotoName
      let strTemp=''
      for (let i = 0; i < temp.length; i++) {
        //如果只有一行步骤内容
        if (i===0){
          strTemp=temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+temp[i].reserve1+'|%|'+temp[i].reserve2+'|%|'+temp[i].reserve3
        }
        else {
          strTemp=strTemp+'|-|'+temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+temp[i].reserve1+'|%|'+temp[i].reserve2+'|%|'+temp[i].reserve3
        }
      }
      let id = this.standardModuleScope.row.id
      let fieldName = "audit_instruction"
      let fieldValue = strTemp
      let fileName = file.name
      this.$request.post("/deleteInstructionFileToExamineProblem",{
        id:id,
        fieldName:fieldName,
        fieldValue:fieldValue,
        fileName:fileName
      }).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        } else {
          //修改大表数据
          this.standardModuleData[this.standardModuleScope.$index].audit_instruction=fieldValue
          //修改scope里的内容
          this.standardModuleScope.row.audit_instruction=fieldValue
          //修改作业指导书列表中的内容
          this.workBook[this.workBookScope.$index].pictureList=problemPhotoName
          //修改弹窗中的走马灯,组合走马灯的图片
          if (problemPhotoName===null || problemPhotoName==='' || problemPhotoName===undefined){
            this.itemView=[]
          }
          else {
            let pictureTemp=problemPhotoName.split('|*|')
            this.itemView=[]
            for (let i = 0; i < pictureTemp.length; i++) {
              let temp=filepath+pictureTemp[i]
              this.itemView.push(temp)
            }
          }
        }
      })

    },
    //点击查看照片的函数
    handlePictureCardPreview1(file) {
      this.dialogImageUrl = file.url;
      this.enlargeImageDialog = true;
    },
    //点击下载照片的函数
    handleDownload(file) {
      //向后端发送请求，下载文件
      this.$request.get('/downloadInstructionFileToExamineProblem?fileName=' + encodeURIComponent(file.name)).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }
        else {
          let base64Data = 'data:application/octet-stream;base64,' + result.data//
          // 创建一个Blob对象
          let blob = this.dataURItoBlob(base64Data);
          // 触发下载
          this.downloadBlob(blob, file.name);
        }
      }).catch(error => {
        // 处理请求错误
        console.error("请求出错", error);
      })
    },
    //单击走马灯上的照片，图片放大方法
    handleImageClick(item){
      this.isImageFile=1
      this.dialogImageUrl=item
      this.enlargeImageDialog=true
    },

    //编辑指导书的视频
    saveFileAnnex2(file, fileList1){
      this.loading=true
      this.videoList=fileList1
      console.log(fileList1,"添加")
      //1.新生成一个文件名称,并且把文件名称的后缀添加上
      let fileName=file.name.split('.')[0]+"-"+this.generateUniqueId()+'.'+file.name.split('.')[file.name.split('.').length-1]
      file.name=fileName
      fileList1[fileList1.length-1].name=fileName
      const formData = new FormData();
      //把文件、id、字段名传出去
      formData.append('file',file.raw)
      formData.append('id',this.standardModuleScope.row.id)
      formData.append('fieldName','audit_instruction')
      formData.append('fileName',fileName)
      let strFileName=''
      for (let i = 0; i < fileList1.length; i++) {
        if (i===0){
          strFileName=fileList1[i].name
        }
        else {
          strFileName=strFileName+'|*|'+fileList1[i].name
        }
      }
      //把文件名给编辑指导书这一行图片的字段
      this.workBookForm.videoList=strFileName
      //组合作业指导书的长字符串
      /*组合作业指导书的内容   注：|*|：是分割语言的；
                                       |%|：是分割每一行中的字段的，具体为:
                                       work:工作步骤|%|
                                       problem:注意点说明|%|
                                       spendTime:需要时间|%|
                                       pictureList:图片列表|%|
                                       videoList:视频列表|%|
                                       |-|分割每一行的
                                       */
      //建一个临时变量，在组合数据中使用
      let temp=_.cloneDeep(this.workBook)
      let strTemp=''
      for (let i = 0; i < temp.length; i++) {
        //如果只有一行步骤内容
        if (i===0){
          strTemp=temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+temp[i].reserve1+'|%|'+temp[i].reserve2+'|%|'+temp[i].reserve3
        }
        else {
          strTemp=strTemp+'|-|'+temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+temp[i].reserve1+'|%|'+temp[i].reserve2+'|%|'+temp[i].reserve3
        }
      }
      //把组合好的图片名以字符串形式给到后端
      formData.append('fieldValue',strTemp)
      console.log(this.workBookForm)
      // console.log(formData)
      console.log(fileList1)
      this.$requestFile.post('/editInstructionFileToExamineProblem', formData).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        }
        else{
          this.loading=false
          //修改大表数据
          this.standardModuleData[this.standardModuleScope.$index].audit_instruction=result.data
          //修改scope里的内容
          this.standardModuleScope.row.audit_instruction=result.data
          //修改作业指导书列表中的内容
          this.workBook[this.workBookScope.$index].videoList=strFileName
          //修改弹窗中的走马灯,组合走马灯的视频
          if (strFileName===null || strFileName==='' || strFileName===undefined){
            this.itemViewVideo=[]
          }
          else {
            let pictureTemp=strFileName.split('|*|')
            this.itemViewVideo=[]
            for (let i = 0; i < pictureTemp.length; i++) {
              let temp=filepath+pictureTemp[i]
              this.itemViewVideo.push(temp)
            }
          }
        }
      })
    },
    //删除指导书的视频
    handleRemovePicture2(file) {
      //对图片列表中的信息进行整合
      const index = this.videoList.findIndex(item => item.name === file.name);
      this.videoList.splice(index,1)
      //拼接数据表中存储文件名的字段
      let problemPhotoName=''
      console.log(this.videoList,"删除")
      for (let i = 0; i < this.videoList.length; i++) {
        if (i===0){
          problemPhotoName = this.pictureFileList[i].name
        }
        else {
          problemPhotoName = problemPhotoName+"|*|"+this.pictureFileList[i].name
        }
      }
      //组合作业指导书
      //建一个临时变量，在组合数据中使用
      let temp=_.cloneDeep(this.workBook)
      temp[this.workBookScope.$index].videoList=problemPhotoName
      let strTemp=''
      for (let i = 0; i < temp.length; i++) {
        //如果只有一行步骤内容
        if (i===0){
          strTemp=temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+temp[i].reserve1+'|%|'+temp[i].reserve2+'|%|'+temp[i].reserve3
        }
        else {
          strTemp=strTemp+'|-|'+temp[i].work+'|%|'+temp[i].problem+'|%|'+temp[i].spendTime+'|%|'+temp[i].pictureList+'|%|'+temp[i].videoList+'|%|'+temp[i].reserve1+'|%|'+temp[i].reserve2+'|%|'+temp[i].reserve3
        }
      }
      let id = this.standardModuleScope.row.id
      let fieldName = "audit_instruction"
      let fieldValue = strTemp
      let fileName = file.name
      this.$request.post("/deleteInstructionFileToExamineProblem",{
        id:id,
        fieldName:fieldName,
        fieldValue:fieldValue,
        fileName:fileName
      }).then(result=>{
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        } else {
          //修改大表数据
          this.standardModuleData[this.standardModuleScope.$index].audit_instruction=fieldValue
          //修改scope里的内容
          this.standardModuleScope.row.audit_instruction=fieldValue
          //修改作业指导书列表中的内容
          this.workBook[this.workBookScope.$index].videoList=problemPhotoName
          //修改弹窗中的走马灯,组合走马灯的视频
          if (problemPhotoName===null || problemPhotoName==='' || problemPhotoName===undefined){
            this.itemViewVideo=[]
          }
          else {
            let pictureTemp=problemPhotoName.split('|*|')
            this.itemViewVideo=[]
            for (let i = 0; i < pictureTemp.length; i++) {
              let temp=filepath+pictureTemp[i]
              this.itemViewVideo.push(temp)
            }
          }
        }
      })

    },

    //画工时的直方图
    initChart() {
      // 组合数据
      let totalTime=0
      for (let i = 0; i < this.workBook.length; i++) {
        this.optionBor.xAxis[0].data[i] = i + 1;
        this.optionBor.series[0].data[i] = this.workBook[i].spendTime;
        totalTime += parseInt(this.workBook[i].spendTime, 10)
      }
      if (this.languageS==='chinese'){
        this.optionBor.title.text='时间分布图'
      }
      else if (this.languageS==='english'){
        this.optionBor.title.text='Time distribution chart'
      }
      else if (this.languageS==='russian'){
        this.optionBor.title.text='График распределения времени'
      }
      this.optionBor.title.subtext='总时长/Total time/Общее время：'+totalTime
      if (this.$refs.myChartBor) {
        // 初始化图表并设置选项
        this.chartUserBor = echarts.init(this.$refs.myChartBor);
        this.chartUserBor.setOption(this.optionBor);
      } else {
        console.error('DOM element not found for chart initialization');
      }
    },

    //——————————————————————————————————————审核问题——————————————————————————————————————
    //查看审核问题
    problemManagementEditShow(doe,scope){
      this.toExamineProblemDoe=doe
      this.toExamineProblemScope=scope
      //要对审核问题进行查看
      //对doe进行赋值，当等于1时，提示表头信息
      if (doe===1){
        if (this.languageS==='chinese'){
          this.titleMessage='您正在查看一条审核问题'
        }
        else if (this.languageS==='english'){
          this.titleMessage='You are viewing one line of audit problem'
        }
        else if (this.languageS==='russian'){
          this.titleMessage='111'
        }
        //给表单赋值
        this.toExamineProblemForm=_.cloneDeep(scope.row)
        //控制抽屉打开
        this.problemManagementDrawer=true
      }
    },

    //新增或编辑一条审核问题
    auditProblemEditShow(doe,scope){
      this.toExamineProblemDoe=doe
      this.toExamineProblemScope=scope
      if (doe===1){
        this.problemDescription={zh:'',en:'',ru:''}
        if (this.languageS==='chinese'){
          this.titleUse='您正在插入一条审核问题'
        }
        else if (this.languageS==='english'){
          this.titleUse='You are inserting one line of audit problem'
        }
        else if (this.languageS==='russian'){
          this.titleUse='Вы вставляете одну строку аудиторской проблемы'
        }
        //对表单变量赋值，给一个空的
        this.toExamineProblemForm={
          //唯一标识，低代码的主键
          id:this.generateUUIDv4(),
          //创建时间
          create_time:'',
          //更新时间
          update_time:'',
          //创建人
          creator:this.useId+'/'+this.useName,
          //流程状态
          process_status:'',
          //更新人
          sys_update_user:'',
          //审核人
          sys_audit_user:'',
          //审核时间
          sys_audit_time:'',
          //逻辑删除
          sys_deleted:0,

          //审核来源
          audit_source:'',
          //审核日期
          audit_date:'',
          //问题审核人
          auditor:'',
          //过程
          process:'',
          //问题类型
          problem_type:'',
          //问题分类
          problem_classification:'',
          //文件名称
          file_name:'',
          //条款编号
          clause_number:'',
          //问题照片
          problem_photo:'',
          //原因
          reason:'',
          //纠正措施
          corrective_action:'',
          //预防措施
          preventive_action:'',
          //纠正完成时间
          correction_completion_time:'',
          //预防完成时间
          prevention_completion_time:'',
          //证据上传
          evidence_upload:'',
          //责任部门
          department:'',
          //措施制定人
          measure_maker:'',
          //纠正措施责任人
          correction_responsible_person:'',
          //预防措施责任人
          prevention_responsible_person:'',
          //审批人
          audit_person:'',
          //批准人
          approver:'',
          //留言
          message:'',
          //完成标记
          completion_mark:'',
          //激励说明
          incentive_explanation:'',
          //效果确认
          effect_confirmation:'',
          //确认人
          confirmer:'',
          //确认时间
          confirmation_time:'',
          //问题关闭
          problem_close:'',
        }
        //控制弹窗打开
        this.problemDialog=true
      }
      if (doe === 2) {
        this.problemDescription={
          zh:this.toExamineProblemScope.row.problem_description.split('|*|')[0],
          en:this.toExamineProblemScope.row.problem_description.split('|*|')[1],
          ru:this.toExamineProblemScope.row.problem_description.split('|*|')[2]
        }
        if (this.languageS==='chinese'){
          this.titleUse='您正在编辑一条审核问题'
        }
        else if (this.languageS==='english'){
          this.titleUse='You are editing one line of audit problem'
        }
        else if (this.languageS==='russian'){
          this.titleUse='Вы редактируете одну строку аудиторской проблемы'
        }
        this.toExamineProblemForm = _.cloneDeep(scope.row)
        this.problemDialog = true
      }
    },
    //向后端保存新增结果
    auditProblemEditOk() {
      //数据校验
      if (this.toExamineProblemForm.audit_source === '' || this.toExamineProblemForm.audit_source === undefined || this.toExamineProblemForm.audit_source === null) {
        this.$message.error('请选择审核来源/Select Audit Source/Выбрать Источник аудита')
        return
      }
      if (this.toExamineProblemForm.process === '' || this.toExamineProblemForm.process === undefined || this.toExamineProblemForm.process === null) {
        this.$message.error('请选择过程/Select Process/Выбрать Процесс')
        return
      }
      if (this.toExamineProblemForm.problem_type === '' || this.toExamineProblemForm.problem_type === undefined || this.toExamineProblemForm.problem_type === null) {
        this.$message.error('请选择问题类型/Select Problem Type/Выбрать Тип проблемы')
        return
      }
      if (this.toExamineProblemForm.problem_classification === '' || this.toExamineProblemForm.problem_classification === undefined || this.toExamineProblemForm.problem_classification === null) {
        this.$message.error('请选择问题分类/Select Problem classification/Выбрать Классификация проблем')
        return
      }
      if (this.toExamineProblemForm.audit_date === '' || this.toExamineProblemForm.audit_date === undefined || this.toExamineProblemForm.audit_date === null) {
        this.$message.error('请选择审核日期/Select Audit Date/Выбрать Дата аудита')
        return
      }
      if (this.toExamineProblemForm.auditor === '' || this.toExamineProblemForm.auditor === undefined || this.toExamineProblemForm.auditor === null) {
        this.$message.error('请填写问题审核人/Fill in Auditor/Заполнить Аудитор')
        return
      }
      if (this.toExamineProblemForm.department === '' || this.toExamineProblemForm.department === undefined || this.toExamineProblemForm.department === null) {
        this.$message.error('请选择责任部门/Select Department/Выбрать Департамент')
        return
      }
      if (this.toExamineProblemForm.measure_maker === '' || this.toExamineProblemForm.measure_maker === undefined || this.toExamineProblemForm.measure_maker === null) {
        this.$message.error('请填写措施制定人/Fill in Measure Maker/Заполнить Разработчики мер')
        return
      }
      if (this.toExamineProblemForm.problem_description === '' || this.toExamineProblemForm.problem_description === undefined || this.toExamineProblemForm.problem_description === null) {
        this.$message.error('请填写问题描述/Fill in problem Description/Заполнить Описание проблемы')
        return
      }

      // 格式化日期字段
      if (this.toExamineProblemForm.audit_date) {
        this.toExamineProblemForm.audit_date = this.formatDateTime(this.toExamineProblemForm.audit_date);
      }
      if (this.toExamineProblemForm.correction_completion_time) {
        this.toExamineProblemForm.correction_completion_time = this.formatDateTime(this.toExamineProblemForm.correction_completion_time);
      }
      if (this.toExamineProblemForm.prevention_completion_time) {
        this.toExamineProblemForm.prevention_completion_time = this.formatDateTime(this.toExamineProblemForm.prevention_completion_time);
      }
      //新增一条
      if (this.toExamineProblemDoe === 1) {
        //向后端发送数据
        this.$request.post('/insertOneAuditProblemToExamineProblem', this.toExamineProblemForm).then(result => {
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          } else {
            this.$message.success("插入成功")
            this.toExamineProblemData.unshift(this.toExamineProblemForm)
          }
        })
        this.problemDialog = false
      }
      //编辑一条审核问题
      else if (this.toExamineProblemDoe === 2) {
        //向后端发送数据
        this.$request.post('/editAuditProblemToExamineProblem', this.toExamineProblemForm).then(result => {
          //如果页面显示“401”，实际为“未登录状态”，页面不允许在继续操作，返回登录提醒
          if (result.code === 401) {
            this.$router.push('UserLogin')
            alert("您未登录，请登录")
          } else {
            this.$message.success(result.data)
            //修改内容后，页面直接调用一遍改过的数据，并把数据实时显示出来，不用刷新再出来
            this.toExamineProblemData.splice(this.toExamineProblemScope.$index, 1, this.toExamineProblemForm)
            this.problemDialog = false
          }
        })
      }
    },

    //查看审核问题照片
    problemPictureEditShow(scope){
      this.toExamineProblemScope=scope
      if (this.languageS==='chinese'){
          this.titleMessage='您正在查看一条审核照片'
        }
      else if (this.languageS==='english'){
          this.titleMessage='You are viewing one line of audit problem'
        }
      else if (this.languageS==='russian'){
          this.titleMessage='Вы видите одну строку аудиторской проблемы'
        }
      //组合图片列表
      this.pictureFileList=[]
      if (this.toExamineProblemScope.row.problem_photo!==null && this.toExamineProblemScope.row.problem_photo!=='' && this.toExamineProblemScope.row.problem_photo!==undefined){
        const temp = this.toExamineProblemScope.row.problem_photo.split('|%|')
        for (let i = 0; i < temp.length; i++) {
          let temp2 = {
            name: temp[i],
            percentage: 0,
            raw: File,
            size: 0,
            status: null,
            uid: null,
            url: filepath + temp[i]
          }
          this.pictureFileList.push(temp2)
        }
      }
      //控制打开
      this.problemPictureDialog=true
    },

    //上传照片
    saveFileAnnex(file, fileList1){
      console.log(fileList1,"添加")
      const formData = new FormData();
      //1.新生成一个文件名称,并且把文件名称的后缀添加上
      let fileName=file.name.split('.')[0]+"-"+this.generateUniqueId()+'.'+file.name.split('.')[file.name.split('.').length-1]
      file.name=fileName
      fileList1[fileList1.length-1].name=fileName
      this.pictureFileList=fileList1
      //拼接数据表中存储文件名的字段
      let problemPhotoName=''
      for (let i = 0; i < fileList1.length; i++) {
        if (i===0){
          problemPhotoName=fileList1[i].name
        }
        else {
          problemPhotoName=problemPhotoName+"|%|"+fileList1[i].name
        }
      }

      //把新的文件名称放进去
      formData.append('file', file.raw)
      formData.append('id', this.toExamineProblemScope.row.id);
      formData.append('problem_photo', problemPhotoName)
      formData.append('fileName',fileName)

      this.$requestFile.post('/addAuditProblemFileToExamineProblem', formData)
          .then(result => {
            if (result.code === 401) {
              this.$router.push('UserLogin');
              alert("您未登录，请登录");
            } else if (result.data === null) {
              alert("程序出现异常，请联系管理员");
            } else {
              console.log("上传成功")
              if (result.data==="保存成功"){
                this.toExamineProblemData[this.toExamineProblemScope.$index].problem_photo=problemPhotoName
                this.toExamineProblemScope.row.prototype=problemPhotoName
              }
            }
          })
          .catch(error => {
            console.error('文件上传失败:', error);
            this.$message.error('文件上传失败，请重试');
          });
    },
    //移除照片
    handleRemovePicture(file) {
      //对图片列表中的信息进行整合
      const index = this.pictureFileList.findIndex(item => item.name === file.name);
      this.pictureFileList.splice(index,1)
      //拼接数据表中存储文件名的字段
      let problemPhotoName=''
      console.log(this.pictureFileList,"删除")
      for (let i = 0; i < this.pictureFileList.length; i++) {
        if (i===0){
          problemPhotoName = this.pictureFileList[i].name
        }
        else {
          problemPhotoName = problemPhotoName+"|%|"+this.pictureFileList[i].name
        }
      }
      let id = this.toExamineProblemScope.row.id
      let fieldName = "problem_photo"
      let fieldValue = problemPhotoName
      let fileName = file.name
      this.$request.post("/deleteFileNameToExamineProblem",{
        id:id,
        fieldName:fieldName,
        fieldValue:fieldValue,
        fileName:fileName
      }).then(result=>{
            if (result.code === 401) {
              this.$router.push('UserLogin')
              alert("您未登录，请登录")
            } else {
              this.toExamineProblemData[this.toExamineProblemScope.$index].problem_photo=fieldValue
              this.toExamineProblemScope.row.problem_photo=fieldValue
            }
      })

    },
    //放大预览照片
    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url;
      this.enlargeImageDialog = true;
    },

    //辅助函数：查询审核问题的当前页数据
    async queryAuditProblemWithPagination() {
      const { currentPage, pageSize } = this.auditProblemPagination;
      const response = await this.$request.post('/queryAuditProblemPaginationToExamineProblem', {
        page: currentPage-1,
        size: pageSize,
      });
      if (response.code === 401) {
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      else {
        for (let i = 0; i < response.data.length; i++) {
          response.data[i].indexUse=(this.auditProblemPagination.currentPage-1)*this.auditProblemPagination.pageSize+1+i
        }
        return response.data
      }
    },
    //辅助函数：查询审核问题条目总数
    async queryAuditProblemQuantity(){
      const response = await this.$request.post('/queryAuditProblemQuantityToExamineProblem');
      if (response.code === 401){
        this.$router.push('UserLogin');
        alert("您未登录，请登录");
      }
      else{
        return response.data
      }
    },
    //处理每页显示条数的变化
    handleSizeChange(val) {
      this.auditProblemPagination.pageSize = val;
      this.queryAuditProblemWithPagination().then(data=>{
        this.toExamineProblemData=data
      });
    },
    //处理选择哪页的变化
    handleCurrentChange(val) {
      this.auditProblemPagination.currentPage = val;
      this.queryAuditProblemWithPagination().then(data=>{
        this.toExamineProblemData=data
      });
    },

    //编辑原因分析、措施
    editMeasure(doe) {
      this.editMeasureDoe = doe;
      // 权限检查
      if (doe !== 4 && this.useName !== this.toExamineProblemScope.row.measure_maker) {
        if (this.languageS==='chinese'){
          this.$message.warning("您不是本问题措施制定人，无法进行修改");
        }
        else if (this.languageS==='english'){
          this.$message.warning("You are not the person who formulated the measures for this problem and cannot make any modifications");
        }
        else if (this.languageS==='russian'){
          this.$message.warning("Вы не тот, кто сформулировал меры по решению этой проблемы и не можете внести каких-либо изменений");
        }
        return;
      }
      // 保存当前编辑的行数据到表单
      this.toExamineProblemForm = _.cloneDeep(this.toExamineProblemScope.row);
      this.toExamineProblemDoe = 2; // 设置为编辑模式

      if (doe === 1) {
        this.titleUse = '您正在编辑原因分析';
        this.causeAnalysis={
          zh:this.toExamineProblemScope.row.reason.split('|*|')[0],
          en:this.toExamineProblemScope.row.reason.split('|*|')[1],
          ru:this.toExamineProblemScope.row.reason.split('|*|')[2]
        }
        this.editReasonDialog = true;
      }
      else if (doe === 2) {
        if (this.languageS==='chinese'){
          this.titleUse = '您正在编辑纠正措施';
        }
        if (this.languageS==='english'){
          this.titleUse = 'You are editing the corrective action';
        }
        if (this.languageS==='russian'){
          this.titleUse = 'Вы редактируете коррективное действие';
        }

        this.correctiveAction={
          zh:this.toExamineProblemScope.row.corrective_action.split('|*|')[0],
          en:this.toExamineProblemScope.row.corrective_action.split('|*|')[1],
          ru:this.toExamineProblemScope.row.corrective_action.split('|*|')[2]
        }
        this.editCorrectiveActionDialog = true;
      }
      else if (doe === 3) {
        if (this.languageS==='chinese'){
          this.titleUse = '您正在编辑预防措施';
        }
        else if (this.languageS==='english'){
          this.titleUse = 'You are editing the preventive action';
        }
        if (this.languageS==='russian'){
          this.titleUse = 'Вы редактируете превентивные действия';
        }
        this.preventiveAction={
          zh:this.toExamineProblemScope.row.preventive_action.split('|*|')[0],
          en:this.toExamineProblemScope.row.preventive_action.split('|*|')[1],
          ru:this.toExamineProblemScope.row.preventive_action.split('|*|')[2]
        }
        this.editPreventiveActionDialog = true;
      }
      else if (doe === 4) {
        const effectData = this.toExamineProblemForm.effect_confirmation.split(';');
        this.toExamineProblemForm.effect_confirmation = effectData[0] || '';
        this.notes = effectData[1] || '';
        if (this.languageS==='chinese'){
          this.titleUse = '您正在编辑效果确认';
        }
        else if (this.languageS==='english'){
          this.titleUse = 'You are editing effect confirmation';
        }
        else if (this.languageS==='russian'){
          this.titleUse = 'Вы редактируете подтверждение эффекта';
        }
        this.editEffectConfirmationDialog = true;
      }
    },
    // 保存编辑的措施信息
    saveMeasureEdit() {
      // 格式化日期字段
      this.toExamineProblemForm.correction_completion_time = this.formatDateTime(this.toExamineProblemForm.correction_completion_time);
      this.toExamineProblemForm.prevention_completion_time = this.formatDateTime(this.toExamineProblemForm.prevention_completion_time);

      // 根据当前打开的对话框类型更新对应的字段
      if (this.editReasonDialog) {
        this.editReasonDialog = false;
      }
      else if (this.editCorrectiveActionDialog) {
        this.editCorrectiveActionDialog = false;
      }
      else if (this.editPreventiveActionDialog) {
        this.editPreventiveActionDialog = false;
      }
      else if (this.editEffectConfirmationDialog) {
        this.toExamineProblemForm.effect_confirmation =
            this.toExamineProblemForm.effect_confirmation + ';' +
            (this.notes || '')
        this.editEffectConfirmationDialog = false;
      }
      // 保存成功后，更新当前行的数据，确保下次编辑能获取到最新数据
      if (this.toExamineProblemScope && this.toExamineProblemScope.row) {
        Object.assign(this.toExamineProblemScope.row, this.toExamineProblemForm);
      }
      // 调用后端保存接口
      this.saveMeasure();
    },
    //向后端保存措施、原因分析及效果确认
    saveMeasure(){
      //向后端发送数据
      this.$request.post('/editAuditProblemToExamineProblem', this.toExamineProblemForm).then(result => {
        //如果页面显示“401”，实际为“未登录状态”，页面不允许在继续操作，返回登录提醒
        if (result.code === 401) {
          this.$router.push('UserLogin')
          alert("您未登录，请登录")
        } else {
          this.$message.success(result.data)
          //修改内容后，页面直接调用一遍改过的数据，并把数据实时显示出来，不用刷新再出来
          this.toExamineProblemData.splice(this.toExamineProblemScope.$index, 1, this.toExamineProblemForm)
        }
      })
    },

    //自动翻译
    problemDescriptionTranslate(val) {
      this.toExamineProblemForm.problem_description=val.zh+'|*|'+val.en+'|*|'+val.ru
    },
    causeAnalysisTranslate(val) {
      this.toExamineProblemForm.reason=val.zh+'|*|'+val.en+'|*|'+val.ru
    },
    correctiveActionTranslate(val) {
      this.toExamineProblemForm.corrective_action=val.zh+'|*|'+val.en+'|*|'+val.ru
    },
    preventiveActionTranslate(val) {
      this.toExamineProblemForm.preventive_action=val.zh+'|*|'+val.en+'|*|'+val.ru
    }

  },
  mounted() {
    this.inquiry()
    this.inquiryAllStandardWorkSupervise()
    this.queryPdfDocumentAll()
    this.queryFormDocumentAll()
  },
}
</script>

<style scoped>
/* 主体左侧的工作步骤栏用到的数据包围的div的样式*/

.el-footer {
  background-color: #ffffff;
  color: #333;
  text-align: center;
  border-width: 3px; /* 设置边框宽度为3像素 */
  border-color: blue; /* 设置边框颜色为蓝色 */
  border-style: solid; /* 设置边框样式为实线 */
  padding: 10px; /* 添加内边距 */
  border-left-color: white;
  border-top: white;
}

.el-aside {
  background-color: #ffffff;
  color: #333;
  text-align: center;
  border-width: 3px; /* 设置边框宽度为3像素 */
  border-color: blue; /* 设置边框颜色为蓝色 */
  border-style: solid; /* 设置边框样式为实线 */
  padding: 10px; /* 添加内边距 */
  height: 89vh;
}

.el-main {
  color: #333;
  text-align: center;
  border-width: 3px; /* 设置边框宽度为3像素 */
  border-color: blue; /* 设置边框颜色为蓝色 */
  border-left-color: white;
  border-style: solid; /* 设置边框样式为实线 */
  padding: 10px; /* 添加内边距 */
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}

.headMain{
  color: #ffffff; /* 设置字体颜色为红色 */
  font-size: 18px;
}
.center-text {
  /* 使用 margin-left 和 margin-right auto 来实现居中效果 */
  margin-left: auto;
  margin-right: auto;
  /* 注意：如果 header 内只有这两个元素，你可能不需要 margin-right: auto */
}

th, td {
  border: 1px solid #1890ff; /* 蓝色边框 */
  padding: 8px;
  text-align: center;
}
th {
  background-color: #e6f7ff; /* 表头背景色 */
}
/*自定义样式*/
.custom-file-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
}

.file-name {
  margin-top: 8px;
  font-size: 12px;
  color: #606266;
  text-align: center;
  word-break: break-all; /* 防止长文件名溢出 */
  max-width: 100%;
}

/* 可选：调整操作按钮的位置 */
.el-upload-list__item-actions {
  margin-top: 8px;
}

/* 富文本编辑器 */
.editor-container {
  border: 1px solid #ccc;
  height: 342px;
  margin-top: 8px;
}
.editor-container .w-e-text-container {
  height: 100% !important;
}
</style>